:root {
    --primary: #6366f1;
    --primary-glow: rgba(99, 102, 241, 0.5);
    --secondary: #ec4899;
    --accent: #8b5cf6;
    --bg-dark: #0f172a;
    --card-bg: rgba(30, 41, 59, 0.7);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --glass-border: rgba(255, 255, 255, 0.1);
}

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

body {
    font-family: 'Outfit', 'Noto Sans KR', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Background Blobs for Atmosphere */
.background-blobs {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    filter: blur(80px);
}

.blob {
    position: absolute;
    border-radius: 50%;
    opacity: 0.6;
    animation: move 20s infinite alternate;
}

.blob-1 {
    width: 400px;
    height: 400px;
    background: var(--primary);
    top: -100px;
    left: -100px;
}

.blob-2 {
    width: 350px;
    height: 350px;
    background: var(--secondary);
    bottom: -50px;
    right: -50px;
    animation-delay: -5s;
}

.blob-3 {
    width: 300px;
    height: 300px;
    background: var(--accent);
    top: 50%;
    left: 40%;
    animation-delay: -10s;
}

@keyframes move {
    from {
        transform: translate(0, 0) scale(1);
    }

    to {
        transform: translate(50px, 50px) scale(1.1);
    }
}

.container {
    width: 100%;
    max-width: 600px;
    padding: 2rem;
    z-index: 1;
}

.header {
    text-align: center;
    margin-bottom: 3rem;
}

.title {
    font-size: 3.5rem;
    font-weight: 800;
    letter-spacing: -0.05em;
    margin-bottom: 0.5rem;
}

.accent {
    background: linear-gradient(to right, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.subtitle {
    font-size: 1.1rem;
    color: var(--text-muted);
}

.card {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 2.5rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease;
}

.upload-area {
    position: relative;
    border: 2px dashed var(--glass-border);
    border-radius: 20px;
    padding: 3rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    overflow: hidden;
}

.upload-area:hover {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.05);
}

.icon-box {
    margin-bottom: 1.5rem;
    color: var(--primary);
}

.upload-text {
    margin-bottom: 2rem;
    color: var(--text-muted);
}

.btn {
    padding: 0.75rem 2rem;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    font-family: inherit;
    font-size: 1rem;
}

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 15px var(--primary-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px var(--primary-glow);
}

.btn-secondary {
    background: transparent;
    border: 1px solid var(--glass-border);
    color: var(--text-main);
    margin-top: 2rem;
    width: 100%;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.05);
}

/* Preview Styles */
.preview-container {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    border-radius: 16px;
    overflow: hidden;
    margin-top: 1rem;
}

#face-preview {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.scanning-line {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(to right, transparent, var(--primary), transparent);
    box-shadow: 0 0 15px var(--primary);
    animation: scan 2s linear infinite;
}

@keyframes scan {
    0% {
        top: 0;
    }

    100% {
        top: 100%;
    }
}

/* Results Styles */
.result-area {
    margin-top: 2rem;
    animation: fadeIn 0.5s ease-out;
}

.result-title,
.result-subtitle {
    font-size: 1.1rem;
    margin-bottom: 1.25rem;
    text-align: center;
    color: var(--text-muted);
}

.result-summary {
    background: rgba(99, 102, 241, 0.1);
    border-radius: 20px;
    padding: 2rem 1rem;
    margin-bottom: 2.5rem;
    border: 1px solid rgba(99, 102, 241, 0.2);
    text-align: center;
}

.total-value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-main);
}

#money-value {
    color: #fbbf24;
    text-shadow: 0 0 20px rgba(251, 191, 36, 0.4);
    font-size: 2.8rem;
    margin: 0 0.25rem;
}

.comparison-container {
    position: relative;
    width: 100%;
    max-width: 500px;
    margin: 0 auto 3rem auto;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    border-radius: 12px;
}

.money-img {
    width: 100%;
    height: auto;
    display: block;
    filter: brightness(0.9) contrast(1.1);
}

.face-frame {
    position: absolute;
    /* Positioned on the right side of the banknote */
    right: 12%;
    top: 50%;
    transform: translateY(-50%);
    width: 29.75%;
    /* 85% of previous 35% */
    aspect-ratio: 1 / 1.4;
    z-index: 2;
}

.money-overlay {
    position: absolute;
    left: 7%;
    bottom: 8%;
    font-size: 2.4rem;
    font-weight: 800;
    color: #3d9180;
    font-family: 'Roboto Mono', monospace;
    letter-spacing: -0.05em;
    -webkit-text-stroke: 1.5px #183722;
    z-index: 2;
}

.processed-face {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    /* Perfect oval given the aspect ratio */
    /* Even lighter, more subtle green tone */
    filter: sepia(20%) hue-rotate(95deg) saturate(0.8) brightness(1.2) contrast(1.0);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    mix-blend-mode: multiply;
    opacity: 0.9;
}

.label-container {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.result-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.result-label-row {
    display: flex;
    justify-content: space-between;
    font-weight: 600;
}

.progress-bar-bg {
    height: 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(to right, var(--primary), var(--accent));
    width: 0%;
    transition: width 1s cubic-bezier(0.17, 0.67, 0.83, 0.67);
    box-shadow: 0 0 10px var(--primary-glow);
}

.loading-overlay {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    padding: 2rem;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.hidden {
    display: none !important;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

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



.coming-soon-section {
    margin-top: 2rem;
    padding: 1.5rem 2.5rem;
}

.section-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    text-align: center;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.currency-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.currency-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.currency-item.disabled {
    opacity: 0.5;
    filter: grayscale(0.5);
    cursor: not-allowed;
}

.currency-item .flag {
    font-size: 2rem;
}

.currency-item span {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.footer {
    text-align: center;
    margin-top: 3rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Mobile Adjustments */
@media (max-width: 480px) {
    .currency-grid {
        grid-template-columns: 1fr;
    }


}