/* Global Styles */
:root {
    --bg-color: #121212;
    --text-color: #ffffff;
    --accent-color: #ff0055; /* Vibrant pink/red accent */
    --card-bg: rgba(255, 255, 255, 0.05);
    --border-color: rgba(255, 255, 255, 0.1);
    --glass-blur: blur(12px);
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Inter', sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-color);
    color: var(--text-color);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* Dynamic Background */
body::before {
    content: '';
    position: absolute;
    width: 100vw;
    height: 100vh;
    background: radial-gradient(circle at 50% 50%, #2a2a2a, #000000);
    z-index: -2;
}

.background-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('https://source.unsplash.com/random/1920x1080/?fashion,abstract') no-repeat center center/cover;
    opacity: 0.15;
    z-index: -1;
    filter: grayscale(100%) contrast(120%);
}

.container {
    width: 90%;
    max-width: 600px; /* Center focused layout */
    padding: 2rem;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    text-align: center;
    animation: fadeIn 0.8s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Header */
header {
    margin-bottom: 2rem;
}

.logo {
    font-family: var(--font-heading);
    font-size: 3rem; 
    font-weight: 700;
    letter-spacing: 2px;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    background: linear-gradient(90deg, #fff, #bbb);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.highlight {
    color: var(--accent-color);
    -webkit-text-fill-color: var(--accent-color);
}

.subtitle {
    font-size: 0.9rem;
    color: #aaa;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* Steps */
.step {
    display: none; /* Hidden by default */
    animation: slideIn 0.5s ease-out forwards;
}

.step.active {
    display: block;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}

/* Step 1: Card Selection */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.gift-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column; /* Stack content vertically */
    justify-content: center;
    align-items: center;
    min-height: 120px; 
    position: relative;
    overflow: hidden;
}

.gift-card:hover, .gift-card.selected {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent-color);
    box-shadow: 0 0 15px rgba(255, 0, 85, 0.3);
    transform: translateY(-5px);
}

.card-content {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.currency {
    font-size: 1rem;
    vertical-align: top;
    margin-top: 5px; 
    display: inline-block;
}

.card-footer {
    font-size: 0.7rem;
    color: #bbb;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Input Section */
.input-group {
    margin-bottom: 2rem;
    text-align: left;
}

.input-group label {
    display: block;
    font-size: 0.8rem;
    color: #ccc;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.input-group input {
    width: 100%;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: white;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s;
}

.input-group input:focus {
    border-color: var(--accent-color);
}

.error-msg {
    color: #ff4444;
    font-size: 0.8rem;
    margin-top: 0.5rem;
    display: none;
}

/* Button */
.btn-primary, .btn-verify {
    width: 100%;
    padding: 1rem;
    background: var(--accent-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: background 0.3s, transform 0.2s;
    box-shadow: 0 4px 15px rgba(255, 0, 85, 0.4);
}

.btn-primary:hover, .btn-verify:hover {
    background: #d40045;
    transform: scale(1.02);
}

.btn-primary:active, .btn-verify:active {
    transform: scale(0.98);
}

/* Step 2: Processing (Console & Progress) */
.console-box {
    background: #000;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 1rem;
    font-family: 'Courier New', monospace;
    text-align: left;
    height: 150px;
    overflow-y: auto;
    margin-bottom: 2rem;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.8);
}

.console-header {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}
.red { background: #ff5f56; }
.yellow { background: #ffbd2e; }
.green { background: #27c93f; }

.console-output {
    font-size: 0.8rem;
    color: #0f0;
    line-height: 1.4;
}

.progress-container {
    width: 100%;
}

.progress-bar {
    width: 100%;
    height: 10px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.progress-fill {
    width: 0%;
    height: 100%;
    background: var(--accent-color);
    transition: width 0.3s linear; 
    box-shadow: 0 0 10px var(--accent-color);
}

.status-text {
    font-size: 0.9rem;
    color: #aaa;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Step 3: Result */
.final-card {
    background: linear-gradient(135deg, #111, #222);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    margin: 2rem 0;
    position: relative;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    overflow: hidden;
}

.final-card::after { /* Shine effect */
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(to bottom right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.05) 50%, rgba(255,255,255,0) 100%);
    transform: rotate(30deg);
    pointer-events: none;
}

.card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 1rem;
}

.brand {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
}

.value {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--accent-color);
}

.card-code {
    background: rgba(0,0,0,0.5);
    padding: 1rem;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: 'Courier New', monospace;
    font-size: 1.2rem;
    letter-spacing: 2px;
    border: 1px dashed #555;
    margin-bottom: 1rem;
}

.copy-btn {
    background: transparent;
    border: none;
    color: #aaa;
    cursor: pointer;
    font-size: 1rem;
    transition: color 0.3s;
}

.copy-btn:hover {
    color: white;
}

.verification-note {
    font-size: 0.8rem;
    color: #aaa;
    margin-top: 1rem;
}

/* Notification Popup */
.notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    display: flex; 
    align-items: center;
    gap: 1rem;
    transform: translateX(120%); 
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275); 
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
    z-index: 100;
}

.notification.show {
    transform: translateX(0);
}

.notif-icon {
    width: 40px;
    height: 40px;
    background: var(--accent-color);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.2rem;
    color: white;
}

.notif-content {
    display: flex;
    flex-direction: column;
}

.notif-user {
    font-weight: 700;
    font-size: 0.9rem;
}

.notif-msg {
    font-size: 0.8rem;
    color: #ccc;
}
