:root {
    --bg-color: #07090e;
    --panel-bg: rgba(15, 18, 28, 0.72);
    --border-color: rgba(255, 255, 255, 0.08);
    --border-glow: rgba(168, 85, 247, 0.25);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --accent-1: #6366f1;
    --accent-2: #ec4899;
    --accent-cyan: #06b6d4;
    --success: #10b981;
    --error: #ef4444;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
    position: relative;
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    -webkit-font-smoothing: antialiased;
}

/* Background Animated Blobs & Cyber Grid */
.background-effects {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    z-index: -1;
    pointer-events: none;
}

.grid-overlay {
    position: absolute;
    inset: 0;
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 40px 40px;
    mask-image: radial-gradient(circle at center, black 40%, transparent 80%);
    -webkit-mask-image: radial-gradient(circle at center, black 40%, transparent 80%);
}

.blob {
    position: absolute;
    filter: blur(90px);
    border-radius: 50%;
    animation: blobMorph 14s infinite ease-in-out alternate;
}

.blob-1 {
    top: -15%;
    left: 10%;
    width: 48vw;
    height: 48vw;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.35) 0%, transparent 70%);
    animation-delay: 0s;
}

.blob-2 {
    bottom: -15%;
    right: 5%;
    width: 45vw;
    height: 45vw;
    background: radial-gradient(circle, rgba(236, 72, 153, 0.28) 0%, transparent 70%);
    animation-delay: -5s;
}

.blob-3 {
    top: 40%;
    left: -10%;
    width: 35vw;
    height: 35vw;
    background: radial-gradient(circle, rgba(6, 182, 212, 0.2) 0%, transparent 70%);
    animation-delay: -9s;
}

@keyframes blobMorph {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(6%, 8%) scale(1.12); }
    100% { transform: translate(-4%, 4%) scale(0.95); }
}

/* Main Container */
.container {
    width: 100%;
    max-width: 480px;
    padding: 24px;
    z-index: 10;
    perspective: 1000px;
}

/* Floating Glass Card */
.glass-panel {
    position: relative;
    background: var(--panel-bg);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-top: 1px solid rgba(255, 255, 255, 0.22);
    border-left: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 30px;
    padding: 38px 32px;
    box-shadow: 
        0 25px 60px -15px rgba(0, 0, 0, 0.75),
        0 0 50px -10px rgba(99, 102, 241, 0.2),
        inset 0 1px 1px rgba(255, 255, 255, 0.15);
    display: flex;
    flex-direction: column;
    gap: 28px;
    animation: panelFloat 7s ease-in-out infinite, slideUp 0.7s cubic-bezier(0.16, 1, 0.3, 1) both;
    transform-origin: center center;
    transition: box-shadow 0.4s ease, border-color 0.4s ease;
}

.glass-panel:hover {
    box-shadow: 
        0 35px 80px -15px rgba(0, 0, 0, 0.85),
        0 0 65px -10px rgba(236, 72, 153, 0.35),
        inset 0 1px 2px rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.16);
}

/* Floating Keyframe Animation */
@keyframes panelFloat {
    0% {
        transform: translateY(0px) rotate(0deg);
    }
    50% {
        transform: translateY(-11px) rotate(0.2deg);
    }
    100% {
        transform: translateY(0px) rotate(0deg);
    }
}

@keyframes slideUp {
    from { 
        opacity: 0; 
        transform: translateY(45px) scale(0.97); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0) scale(1); 
    }
}

/* Header & Status Pill */
.header {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 5px 14px;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.25);
    border-radius: 999px;
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.15);
}

.status-dot {
    width: 7px;
    height: 7px;
    background-color: var(--success);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--success);
    animation: statusPulse 2s infinite ease-in-out;
}

@keyframes statusPulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.3); opacity: 0.6; }
}

.status-text {
    font-family: 'Outfit', sans-serif;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: #6ee7b7;
    text-transform: uppercase;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin-top: 4px;
}

.logo-wrapper {
    position: relative;
    width: 46px;
    height: 46px;
    border-radius: 12px;
    padding: 2px;
    background: linear-gradient(135deg, var(--accent-2), var(--accent-1));
    box-shadow: 0 0 20px rgba(236, 72, 153, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
}

.logo h1 {
    font-family: 'Outfit', sans-serif;
    font-size: 32px;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: #ffffff;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.highlight {
    background: linear-gradient(135deg, #a855f7 0%, #ec4899 50%, #38bdf8 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: textShimmer 6s linear infinite;
    filter: drop-shadow(0 0 16px rgba(236, 72, 153, 0.4));
}

@keyframes textShimmer {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.subtitle {
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 400;
    line-height: 1.5;
    max-width: 320px;
    margin: 0 auto;
}

/* Stats Section */
.stats-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(8, 11, 20, 0.6);
    border-radius: 20px;
    padding: 18px 24px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: inset 0 2px 12px rgba(0, 0, 0, 0.4);
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    gap: 4px;
}

.stat-divider {
    width: 1px;
    height: 36px;
    background: linear-gradient(to bottom, transparent, rgba(255, 255, 255, 0.12), transparent);
}

.stat-label {
    font-family: 'Outfit', sans-serif;
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1.4px;
}

.stat-value {
    font-family: 'Outfit', sans-serif;
    font-size: 21px;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: -0.01em;
}

.highlight-stat {
    color: #38bdf8;
    text-shadow: 0 0 12px rgba(56, 189, 248, 0.4);
}

/* Button & Action Section */
.action-section {
    display: flex;
    justify-content: center;
}

.glow-on-hover {
    width: 100%;
    padding: 16px 24px;
    border: none;
    outline: none;
    color: #ffffff;
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 50%, #ec4899 100%);
    background-size: 200% auto;
    cursor: pointer;
    position: relative;
    border-radius: 16px;
    font-family: 'Outfit', sans-serif;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.5px;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 56px;
    box-shadow: 0 10px 25px -8px rgba(124, 58, 237, 0.5);
}

.btn-text {
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-icon {
    transition: transform 0.3s ease;
}

.glow-on-hover:hover {
    transform: translateY(-2.5px);
    background-position: 100% 0;
    box-shadow: 
        0 16px 35px -8px rgba(236, 72, 153, 0.6),
        0 0 20px rgba(99, 102, 241, 0.4);
}

.glow-on-hover:hover .btn-icon {
    transform: rotate(15deg) scale(1.1);
}

.glow-on-hover:active {
    transform: translateY(1px);
    box-shadow: 0 5px 15px -4px rgba(124, 58, 237, 0.4);
}

.glow-on-hover:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Spinner Loader */
.loader {
    width: 22px;
    height: 22px;
    border: 3px solid rgba(255, 255, 255, 0.25);
    border-radius: 50%;
    border-top-color: #ffffff;
    animation: spin 0.8s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Result Section */
.result-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    animation: resultPop 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes resultPop {
    from { opacity: 0; transform: translateY(14px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.key-box {
    background: rgba(10, 14, 26, 0.85);
    border: 1px solid rgba(56, 189, 248, 0.4);
    border-radius: 16px;
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 
        0 8px 24px -6px rgba(0, 0, 0, 0.6),
        0 0 20px -4px rgba(56, 189, 248, 0.25),
        inset 0 1px 2px rgba(255, 255, 255, 0.1);
}

.key-inner {
    display: flex;
    flex-direction: column;
    gap: 4px;
    overflow: hidden;
}

.key-tag {
    font-family: 'Outfit', sans-serif;
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: #38bdf8;
    text-transform: uppercase;
}

.key-text {
    font-family: 'JetBrains Mono', monospace;
    font-size: 17px;
    font-weight: 600;
    letter-spacing: 1.2px;
    color: #ffffff;
    word-break: break-all;
    text-shadow: 0 0 10px rgba(56, 189, 248, 0.5);
}

.icon-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    border-radius: 10px;
    margin-left: 12px;
    flex-shrink: 0;
}

.icon-btn:hover {
    color: #ffffff;
    background: rgba(56, 189, 248, 0.15);
    border-color: rgba(56, 189, 248, 0.4);
    transform: scale(1.08);
    box-shadow: 0 0 15px rgba(56, 189, 248, 0.3);
}

.status-msg {
    font-size: 13.5px;
    font-weight: 500;
    text-align: center;
    line-height: 1.4;
}

.success { 
    color: #34d399; 
    text-shadow: 0 0 10px rgba(52, 211, 153, 0.3);
}

/* Error Container */
.error-container {
    animation: resultPop 0.4s ease forwards;
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 16px;
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.error-header {
    display: flex;
    align-items: center;
    gap: 8px;
}

.error-title {
    font-family: 'Outfit', sans-serif;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #f87171;
}

.error { 
    color: #fca5a5; 
    text-align: left;
}

/* Footer */
.footer {
    display: flex;
    justify-content: center;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding-top: 18px;
}

.footer-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.2px;
}

.footer-badge svg {
    opacity: 0.7;
}

/* Responsive adjustment */
@media (max-width: 480px) {
    .glass-panel {
        padding: 30px 22px;
        border-radius: 24px;
    }
    .logo h1 {
        font-size: 28px;
    }
    .stat-value {
        font-size: 19px;
    }
}
