/* App-specific styles — shared styles in detail-shared.css */

/* ===== Skeleton (app-specific ID) ===== */
#app-detail-skeleton {
    position: relative;
}

#app-detail-skeleton .pd-hero {
    animation: none;
}

/* Staggered reveal (app-specific ID) */
#app-detail-content.pd-revealing {
    opacity: 1 !important;
}


/* ===== Hero (app-specific: position relative) ===== */
.pd-hero {
    position: relative;
}

/* ===== Badges (apps version — absolute positioned) ===== */
.pd-badges {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    gap: 8px;
    z-index: 2;
}

.pd-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 100px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ===== Category (app-specific extras) ===== */
.pd-category {
    align-items: center;
    gap: 6px;
}

/* ===== Key Gate ===== */
.key-gate {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 70vh;
    padding: 120px 20px 40px;
}

.key-gate-card {
    background: rgba(18, 14, 32, 0.85);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(167, 139, 250, 0.15);
    border-radius: 24px;
    padding: 48px 40px;
    max-width: 440px;
    width: 100%;
    text-align: center;
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.4),
        0 0 80px rgba(109, 40, 217, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    animation: keyGateIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes keyGateIn {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.key-gate-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 20px;
    border-radius: 20px;
    background: linear-gradient(135deg, #a78bfa, #6d28d9);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: keyIconPulse 2.5s ease-in-out infinite;
}

.key-gate-icon i,
.key-gate-icon svg {
    width: 36px;
    height: 36px;
    color: #fff;
    stroke: #fff;
}

@keyframes keyIconPulse {
    0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(167, 139, 250, 0.4); }
    50% { transform: scale(1.05); box-shadow: 0 0 20px 8px rgba(167, 139, 250, 0.15); }
}

.key-gate-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}

.key-gate-desc {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.55);
    margin-bottom: 28px;
    line-height: 1.5;
}

.key-gate-input-wrap {
    margin-bottom: 16px;
}

.key-gate-input {
    width: 100%;
    padding: 14px 18px;
    border-radius: 14px;
    border: 1.5px solid rgba(167, 139, 250, 0.2);
    background: rgba(255, 255, 255, 0.04);
    color: #fff;
    font-size: 1rem;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    letter-spacing: 0.08em;
    text-align: center;
    outline: none;
    transition: border-color 0.3s, box-shadow 0.3s, background 0.3s;
    box-sizing: border-box;
}

.key-gate-input::placeholder {
    color: rgba(255, 255, 255, 0.25);
    letter-spacing: 0.06em;
}

.key-gate-input:focus {
    border-color: rgba(167, 139, 250, 0.5);
    box-shadow: 0 0 0 4px rgba(167, 139, 250, 0.1);
    background: rgba(255, 255, 255, 0.06);
}

.key-gate-input.error {
    border-color: rgba(239, 68, 68, 0.5);
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.1);
    animation: keyShake 0.4s ease-in-out;
}

@keyframes keyShake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-8px); }
    40% { transform: translateX(8px); }
    60% { transform: translateX(-4px); }
    80% { transform: translateX(4px); }
}

.key-gate-error {
    margin-top: 10px;
    font-size: 0.82rem;
    color: #ef4444;
    font-weight: 500;
    transition: opacity 0.3s;
}

.key-gate-error.hidden {
    display: none;
}

.key-gate-btn {
    width: 100%;
    padding: 14px 24px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 14px;
    margin-bottom: 24px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.key-gate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(109, 40, 217, 0.3);
}

.key-gate-btn:active {
    transform: translateY(0);
}

.key-gate-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.key-gate-footer {
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.key-gate-footer p {
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.4);
    margin-bottom: 12px;
}

.key-gate-contacts {
    display: flex;
    justify-content: center;
    gap: 16px;
}

.key-contact-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.65);
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.2s;
}

.key-contact-link i,
.key-contact-link svg {
    width: 16px;
    height: 16px;
}

.key-contact-link:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    border-color: rgba(167, 139, 250, 0.3);
}

/* ===== Remaining Days Banner ===== */
.key-remaining {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
    padding: 10px 20px;
    border-radius: 12px;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    color: #10b981;
    font-size: 0.85rem;
    font-weight: 500;
    animation: keyGateIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) 0.2s both;
}

.key-remaining.expired {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.key-remaining i,
.key-remaining svg {
    width: 16px;
    height: 16px;
}

.key-remaining.hidden {
    display: none;
}

/* ===== Responsive ===== */
@media (max-width: 480px) {
    .key-gate-card {
        padding: 32px 24px;
        border-radius: 20px;
    }

    .key-gate-title {
        font-size: 1.25rem;
    }

    .key-gate-input {
        font-size: 0.9rem;
        padding: 12px 14px;
    }

    .key-gate-contacts {
        flex-direction: column;
        gap: 8px;
    }
}

/* Light theme — key gate */
body.light-theme .key-gate-card {
    background: rgba(255, 255, 255, 0.8);
    border-color: rgba(0, 0, 0, 0.06);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
}
body.light-theme .key-gate-title { color: #1a1a2e; }
body.light-theme .key-gate-desc { color: rgba(26, 26, 46, 0.55); }
body.light-theme .key-gate-input {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.1);
    color: #1a1a2e;
}
body.light-theme .key-gate-input::placeholder { color: rgba(26, 26, 46, 0.3); }
body.light-theme .key-gate-footer { border-top-color: rgba(0, 0, 0, 0.06); }
body.light-theme .key-gate-footer p { color: rgba(26, 26, 46, 0.4); }
body.light-theme .key-contact-link {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.08);
    color: rgba(26, 26, 46, 0.6);
}
body.light-theme .key-remaining {
    background: rgba(16, 185, 129, 0.08);
    border-color: rgba(16, 185, 129, 0.15);
}