/* Instant Delivery Module CSS - Glassmorphism */
.container {
    background: var(--card-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    padding: 3.5rem;
    border-radius: 1.5rem;
    box-shadow: var(--glass-shadow);
    border: 1px solid var(--card-border);
    max-width: 550px;
    width: 90%;
    animation: fadeIn 0.6s cubic-bezier(0.22, 1, 0.36, 1);
    margin: 4rem auto;
    text-align: center;
    position: relative;
    overflow: hidden;
}

/* Background Glow */
.container::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.1) 0%, transparent 70%);
    pointer-events: none;
    z-index: -1;
}

h1 {
    font-size: 2.25rem;
    margin-bottom: 2rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--text-color) 30%, #3b82f6 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.5px;
    text-shadow: 0 0 30px rgba(59, 130, 246, 0.3);
}

/* Form Elements */
.instant-input {
    width: 100%;
    padding: 1.25rem 1.5rem;
    margin-bottom: 2rem;
    border-radius: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(3, 7, 18, 0.6);
    color: var(--text-color);
    font-family: inherit;
    font-size: 1.1rem;
    outline: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-sizing: border-box;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

.instant-input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.instant-input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15), inset 0 2px 4px rgba(0, 0, 0, 0.3);
    background: rgba(3, 7, 18, 0.8);
    transform: translateY(-1px);
}

.action-button {
    width: 100%;
    border: none;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    color: white;
    padding: 1.25rem;
    font-size: 1.15rem;
    font-weight: 700;
    border-radius: 1rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2), 0 0 20px rgba(59, 130, 246, 0.3);
    position: relative;
    overflow: hidden;
    letter-spacing: 0.5px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.action-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.action-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.3), 0 0 30px rgba(59, 130, 246, 0.5);
}

.action-button:hover::before {
    left: 100%;
}

.action-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
    filter: grayscale(0.5);
}

.secondary-button {
    background: transparent;
    color: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
    font-size: 0.9rem;
    cursor: pointer;
    margin-top: 2rem;
    transition: all 0.2s ease;
}

.secondary-button:hover {
    color: white;
    border-color: rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.05);
}

/* Messages */
.message {
    margin-top: 1.5rem;
    font-size: 0.95rem;
    padding: 0.75rem;
    border-radius: 0.5rem;
    animation: fadeIn 0.3s ease;
}

.message.error {
    color: #fca5a5;
    background: rgba(127, 29, 29, 0.3);
    border: 1px solid rgba(248, 113, 113, 0.2);
}

/* Section Title */
.section-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 1.25rem;
}

/* ── Code Validity Banner ───────────────────────────────── */
.code-validity-banner {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    background: rgba(251, 191, 36, 0.08);
    border: 1px solid rgba(251, 191, 36, 0.2);
    border-radius: 0.85rem;
    padding: 1rem 1.25rem;
    margin-bottom: 1.25rem;
    text-align: left;
    animation: fadeIn 0.4s ease;
}

.validity-icon {
    font-size: 1.3rem;
    flex-shrink: 0;
    line-height: 1.4;
}

.validity-lines {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.validity-lines p {
    margin: 0;
    font-size: 0.82rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.75);
}

.validity-lines p strong {
    color: #fbbf24;
    font-weight: 700;
}

.validity-lines p:last-child {
    margin-top: 0.3rem;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(251, 191, 36, 0.15);
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.78rem;
}

.credential-validity {
    margin-top: 1.25rem;
    margin-bottom: 0.5rem;
}

.credential-validity .validity-lines p:last-child {
    border-top: none;
    padding-top: 0;
    margin-top: 0;
}

/* ── Search Bar ──────────────────────────────────────────── */
.search-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.search-icon {
    position: absolute;
    left: 1rem;
    color: rgba(255, 255, 255, 0.3);
    pointer-events: none;
    z-index: 1;
}

.game-search-input {
    width: 100%;
    padding: 0.85rem 5.5rem 0.85rem 2.75rem;
    border-radius: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(3, 7, 18, 0.5);
    color: var(--text-color);
    font-family: inherit;
    font-size: 0.95rem;
    outline: none;
    transition: all 0.25s ease;
    box-sizing: border-box;
}

.game-search-input::placeholder {
    color: rgba(255, 255, 255, 0.25);
}

.game-search-input:focus {
    border-color: #3b82f6;
    background: rgba(3, 7, 18, 0.7);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.game-count {
    position: absolute;
    right: 1rem;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.3);
    font-weight: 500;
    white-space: nowrap;
}

/* ── Game List Wrapper (Scrollable) ──────────────────────── */
.game-list-wrapper {
    max-height: 380px;
    overflow-y: auto;
    border-radius: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.06);
    scrollbar-width: thin;
    scrollbar-color: rgba(59, 130, 246, 0.3) transparent;
}

.game-list-wrapper::-webkit-scrollbar {
    width: 6px;
}

.game-list-wrapper::-webkit-scrollbar-track {
    background: transparent;
}

.game-list-wrapper::-webkit-scrollbar-thumb {
    background: rgba(59, 130, 246, 0.3);
    border-radius: 3px;
}

.game-list-wrapper::-webkit-scrollbar-thumb:hover {
    background: rgba(59, 130, 246, 0.5);
}

/* ── Game Grid ──────────────────────────────────────────── */
.game-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
}

.game-card {
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    padding: 1rem 1.25rem;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: left;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.game-card:first-child {
    border-radius: 0.75rem 0.75rem 0 0;
}

.game-card:last-child {
    border-bottom: none;
    border-radius: 0 0 0.75rem 0.75rem;
}

.game-card:hover {
    background: rgba(59, 130, 246, 0.08);
}

.game-card:active {
    background: rgba(59, 130, 246, 0.15);
    transform: scale(0.995);
}

.game-card-info {
    flex: 1;
    min-width: 0;
}

.game-card-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: white;
    margin-bottom: 0.2rem;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.game-card-platform {
    display: inline-block;
    padding: 0.1rem 0.45rem;
    background: rgba(59, 130, 246, 0.12);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.game-card-arrow {
    color: rgba(255, 255, 255, 0.15);
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.game-card:hover .game-card-arrow {
    color: #3b82f6;
    transform: translateX(3px);
}

.game-card:hover .game-card-name {
    color: #93c5fd;
}

.no-results {
    color: rgba(255, 255, 255, 0.3);
    font-size: 0.9rem;
    padding: 2rem 1rem;
    text-align: center;
}

/* ── Result Card ─────────────────────────────────────────── */
.result-card {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1.5rem;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    position: relative;
    overflow: hidden;
}

.game-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.platform-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 9999px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.credential-group {
    margin-bottom: 1.25rem;
    text-align: left;
}

.credential-group label {
    display: block;
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.input-with-copy {
    position: relative;
    display: flex;
    align-items: center;
}

.input-with-copy input {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.75rem;
    padding: 0.85rem 3rem 0.85rem 1rem;
    color: white;
    font-family: 'Courier New', monospace;
    font-size: 1rem;
    outline: none;
    transition: all 0.2s;
}

.input-with-copy input:focus {
    border-color: #3b82f6;
    background: rgba(255, 255, 255, 0.08);
}

.input-with-copy .copy-btn {
    position: absolute;
    right: 0.5rem;
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 0.4rem;
    cursor: pointer;
    border-radius: 0.5rem;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.input-with-copy .copy-btn:hover {
    color: white;
    background: rgba(255, 255, 255, 0.1);
}

.input-with-copy .copy-btn:active {
    transform: scale(0.95);
}

/* Spinner */
.spinner {
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-left-color: #3b82f6;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    margin: 1.5rem auto;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Responsive */
@media (max-width: 480px) {
    .container {
        padding: 2rem 1.5rem;
        margin: 3rem auto;
    }

    h1 {
        font-size: 1.75rem;
    }

    .game-list-wrapper {
        max-height: 300px;
    }
}