:root {
    --primary-color: #ff7eb9;
    --secondary-color: #7afcff;
    --accent-color: #6c5ce7;
    --bg-color: #f0f2f5;
    --text-color: #333;
    --secondary-text: #777;
    --glass-bg: rgba(255, 255, 255, 0.9);
    --glass-border: rgba(255, 255, 255, 0.5);
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    --font-main: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, Roboto, sans-serif;
    --joseon-bg: #F9F7F2;
    --joseon-ink: #111;
    --facetier-gold: #D4AF37;
}

/* Face Tier Theme Variables */
.facetier-theme-active {
    background: #121212 !important;
}

.facetier-theme-active #app {
    background: #1a1a1a;
    border: 1px solid #333;
    color: #fff;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.facetier-theme-active .logo-text,
.facetier-theme-active .nav-item {
    color: #fff !important;
}

.facetier-theme-active .main-header {
    background: #1a1a1a;
    border-bottom: 1px solid #333;
}

.facetier-theme-active h1,
.facetier-theme-active h2,
.facetier-theme-active h3,
.facetier-theme-active .title-container h1 {
    color: #fff !important;
}

.facetier-theme-active .subtitle,
.facetier-theme-active .back-nav {
    color: #888 !important;
}

.facetier-theme-active .upload-area {
    background: rgba(255, 255, 255, 0.03) !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
    color: #ccc !important;
}

.facetier-theme-active .upload-area:hover {
    background: rgba(255, 255, 255, 0.08) !important;
    border-color: rgba(255, 255, 255, 0.3) !important;
}

.facetier-theme-active .loading-text {
    color: #aaa !important;
}


* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-color);
    color: var(--text-color);
    min-height: 100vh;
    overflow-x: hidden;
    background: linear-gradient(to bottom, #f0f2f5, #ffffff);
}

/* Header Styling */
.main-header {
    height: 60px;
    background: white;
    display: flex;
    justify-content: center;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.header-content {
    width: 100%;
    max-width: 500px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}

.main-nav {
    display: flex;
    gap: 20px;
}

.nav-item {
    text-decoration: none;
    color: var(--text-color);
    font-size: 0.9rem;
    font-weight: 600;
    transition: color 0.3s;
}

.nav-item:hover {
    color: var(--accent-color);
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.logo-img {
    height: 35px;
    width: auto;
    max-width: 150px;
    object-fit: contain;
}

.logo-text {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--accent-color);
    letter-spacing: -0.5px;
}

#app {
    width: 100%;
    max-width: 500px;
    margin: 20px auto 40px;
    background: white;
    border-radius: 24px;
    box-shadow: var(--shadow);
    padding: 40px 20px;
    text-align: center;
    min-height: 80vh;
}

/* Hub Section Styling */
.hub-header {
    text-align: left;
    margin-bottom: 30px;
}

.hub-header h2 {
    font-size: 1.4rem;
    font-weight: 800;
    margin-bottom: 5px;
}

.hub-header p {
    color: var(--secondary-text);
    font-size: 0.9rem;
}

/* Intro Section */
.intro-section {
    text-align: left;
    margin-bottom: 35px;
    padding: 25px;
    background: linear-gradient(135deg, rgba(108, 92, 231, 0.05) 0%, rgba(255, 126, 185, 0.05) 100%);
    border-radius: 20px;
    border: 1px solid rgba(108, 92, 231, 0.1);
    overflow: hidden;
}

.intro-section h1 {
    font-size: 1.2rem;
    font-weight: 800;
    margin-bottom: 12px;
    color: var(--accent-color);
}

.intro-section p {
    font-size: 0.9rem;
    line-height: 1.7;
    color: #555;
    word-break: keep-all;
}

/* Blog Preview Section */
.blog-preview-section {
    margin-top: 50px;
    text-align: left;
}

.blog-preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.blog-preview-header h2 {
    font-size: 1.3rem;
    font-weight: 800;
}

.view-all-link {
    font-size: 0.85rem;
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 600;
}

.blog-preview-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
}

.blog-mini-card {
    display: flex;
    gap: 15px;
    padding: 12px;
    background: #fff;
    border-radius: 16px;
    border: 1px solid #eee;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s;
    overflow: hidden;
}

.blog-mini-card:hover {
    transform: translateX(5px);
    border-color: var(--accent-color);
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.blog-mini-img {
    width: 80px;
    height: 80px;
    border-radius: 10px;
    object-fit: cover;
    flex-shrink: 0;
}

.blog-mini-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.blog-mini-info h3 {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 5px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-mini-info p {
    font-size: 0.8rem;
    color: var(--secondary-text);
    display: -webkit-box;
    -webkit-line-clamp: 1;
    line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Comprehensive Footer */
.main-footer {
    margin-top: 60px;
    padding: 40px 20px;
    border-top: 1px solid #eee;
    text-align: center;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.footer-links a {
    text-decoration: none;
    color: #777;
    font-size: 0.85rem;
    font-weight: 500;
}

.footer-links a:hover {
    color: var(--accent-color);
}

.footer-info {
    font-size: 0.8rem;
    color: #aaa;
    line-height: 1.6;
}

.test-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.test-card {
    background: #f8f9fa;
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid #f1f3f5;
    text-align: left;
}

.test-card.active-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    border-color: var(--accent-color);
}

.card-img {
    height: 120px;
    background: #e9ecef;
    display: flex;
    justify-content: center;
    align-items: center;
}

.card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-img.placeholder {
    font-size: 2.5rem;
    color: #ced4da;
}

.badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #ff4757;
    color: white;
    font-size: 0.7rem;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 10px;
    z-index: 5;
}

.card-info {
    padding: 12px;
}

.card-info h3 {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-info p {
    font-size: 0.75rem;
    color: var(--secondary-text);
    line-height: 1.3;
}

.test-card.ready {
    opacity: 0.7;
    cursor: default;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(15px);
    }

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

.fade-in {
    animation: fadeIn 0.6s ease forwards;
}

/* Nav back button */
.back-nav {
    text-align: left;
    margin-bottom: 25px;
    color: var(--secondary-text);
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    font-weight: 500;
}

.back-nav:hover {
    color: var(--accent-color);
}

/* Specific Test Sections */
.section {
    display: none;
}

.section.active {
    display: block;
}

.title-container h1 {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 10px;
    color: #111;
}

.subtitle {
    color: var(--secondary-text);
    font-size: 1rem;
    margin-bottom: 30px;
}

.main-img-placeholder {
    width: 220px;
    height: 220px;
    margin: 0 auto 35px;
    border-radius: 30px;
    background: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

.main-img-placeholder img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.btn {
    background: var(--accent-color);
    color: white;
    border: none;
    padding: 16px 45px;
    font-size: 1.1rem;
    font-weight: 700;
    border-radius: 16px;
    cursor: pointer;
    box-shadow: 0 10px 20px rgba(108, 92, 231, 0.3);
    transition: all 0.3s;
    width: 100%;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 25px rgba(108, 92, 231, 0.4);
}

.btn:active {
    transform: scale(0.98);
}

/* Upload & Interactive Elements */
.upload-area {
    border: 2px dashed #dee2e6;
    border-radius: 20px;
    padding: 30px 20px;
    cursor: pointer;
    transition: all 0.3s;
    background: #f8f9fa;
    margin-bottom: 25px;
}

.upload-area:hover {
    border-color: var(--accent-color);
    background: #f0f1ff;
}

.upload-icon {
    font-size: 3.5rem;
    margin-bottom: 15px;
    display: block;
}

#file-input {
    display: none;
}

.preview-container {
    display: none;
}

#image-preview {
    max-width: 100%;
    max-height: 280px;
    object-fit: contain;
    border-radius: 20px;
    background: #f8f9fa;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

/* Loading Section */
.scan-box {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    display: inline-block;
    width: 260px;
    height: 340px;
    background: #000;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

#scan-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.8;
}

.scanner {
    width: 100%;
    height: 3px;
    background: var(--accent-color);
    position: absolute;
    top: 0;
    left: 0;
    box-shadow: 0 0 15px var(--accent-color);
    animation: scan 2s linear infinite;
    z-index: 10;
}

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

    50% {
        top: 100%;
    }

    100% {
        top: 0%;
    }
}

.loader {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--accent-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

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

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

.loading-text {
    margin-top: 20px;
    font-weight: 600;
    color: #444;
}

/* Result Section */
.result-title {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--accent-color);
    margin-bottom: 20px;
    line-height: 1.3;
}

.result-char-img {
    width: 280px;
    height: 280px;
    object-fit: cover;
    display: block;
    margin: 0 auto 25px;
    border-radius: 24px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    border: 1px solid #eee;
}

.result-keywords {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-bottom: 25px;
}

.keyword {
    background: #f0f1ff;
    color: var(--accent-color);
    padding: 6px 18px;
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: 700;
}

.result-desc {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 20px;
    text-align: left;
    line-height: 1.7;
    font-size: 1rem;
    color: #444;
    margin-bottom: 35px;
    border-left: 5px solid var(--accent-color);
}

/* Share & Toast */
.share-container {
    display: flex;
    justify-content: center;
    gap: 25px;
    margin-bottom: 30px;
}

.share-btn {
    width: 60px;
    height: 60px;
    border-radius: 18px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    background: white;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    font-size: 1.5rem;
    border: 1px solid #eee;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.share-btn:hover {
    transform: translateY(-5px);
    background: var(--accent-color);
    color: white;
    border-color: var(--accent-color);
}

#toast {
    visibility: hidden;
    min-width: 250px;
    background-color: #111;
    color: #fff;
    text-align: center;
    border-radius: 16px;
    padding: 16px;
    position: fixed;
    z-index: 1000;
    left: 50%;
    bottom: 30px;
    transform: translateX(-50%);
    font-size: 0.95rem;
    font-weight: 500;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

#toast.show {
    visibility: visible;
    animation: fadein 0.5s, fadeout 0.5s 2.5s;
}

@keyframes fadein {
    from {
        bottom: 0;
        opacity: 0;
    }

    to {
        bottom: 30px;
        opacity: 1;
    }
}

@keyframes fadeout {
    from {
        bottom: 30px;
        opacity: 1;
    }

    to {
        bottom: 0;
        opacity: 0;
    }
}

.footer {
    margin-top: 35px;
    font-size: 0.8rem;
    color: #aaa;
    line-height: 1.5;
}

/* Moral Test Theme - Light & Premium */
.moral-theme-active {
    background: #f0f2f5 !important;
}

.moral-theme-active #app {
    background: white;
    box-shadow: var(--shadow);
    border: none;
}

.moral-theme-active .logo-text,
.moral-theme-active .nav-item {
    color: var(--text-color) !important;
}

.moral-theme-active .main-header {
    background: white;
    border-bottom: none;
}

/* Glassmorphism 2.0 - Light Version */
.glass {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 24px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

/* Bento Grid */
.bento-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
        "main main"
        "stat stat"
        "trait ability"
        "tip tip";
    gap: 15px;
    margin-top: 25px;
}

.bento-item {
    padding: 20px;
    text-align: left;
    display: flex;
    flex-direction: column;
}

.bento-main {
    grid-area: main;
    padding: 0;
    overflow: hidden;
    height: 280px;
    position: relative;
}

.bento-main img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #f8f9fa;
    border-radius: 24px;
}

.bento-stat {
    grid-area: stat;
}

.bento-trait {
    grid-area: trait;
}

.bento-ability {
    grid-area: ability;
}

.bento-tip {
    grid-area: tip;
    background: rgba(108, 92, 231, 0.05) !important;
}

.label {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--secondary-text);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
    display: block;
}

.bento-item p {
    font-size: 0.95rem;
    color: var(--text-color);
    line-height: 1.5;
    margin: 0;
}

/* Stat Bar */
.stat-bar {
    width: 100%;
    height: 12px;
    background: #eee;
    border-radius: 6px;
    overflow: hidden;
    margin-top: 5px;
}

.stat-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #ff7eb9, #6c5ce7);
    transition: width 1.5s cubic-bezier(0.1, 0, 0.1, 1);
}

/* Brand Nudging */
.nudging-container {
    margin-top: 30px;
    padding: 25px;
    text-align: left;
}

.nudging-container h3 {
    font-size: 1.1rem;
    color: var(--text-color);
    margin-bottom: 15px;
}

.nudge-item {
    padding: 15px;
    border-radius: 12px;
    background: #f8f9fa;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 600;
    color: var(--text-color);
    font-size: 0.9rem;
    border: 1px solid #f1f3f5;
}

.nudge-item:hover {
    background: white;
    transform: translateX(5px);
    border-color: var(--accent-color);
}

/* Share Buttons with Text */
.share-container {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 30px;
}

.share-btn {
    width: auto;
    height: auto;
    padding: 12px 20px;
    border-radius: 14px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    background: white;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    font-size: 0.95rem;
    font-weight: 700;
    border: 1px solid #eee;
    transition: all 0.3s;
    color: var(--text-color);
}

.share-btn:hover {
    transform: translateY(-3px);
    background: #f8f9fa;
    border-color: var(--accent-color);
}

/* AI Landmarks Morphing Animation */
.landmark-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 20;
}

.dot {
    position: absolute;
    width: 5px;
    height: 5px;
    background: var(--accent-color);
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(108, 92, 231, 0.5);
    opacity: 0;
    transition: all 0.5s ease;
}

.landmark-active .dot {
    opacity: 0.8;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 0.8;
    }

    50% {
        transform: scale(1.8);
        opacity: 0.4;
    }

    100% {
        transform: scale(1);
        opacity: 0.8;
    }
}

.scan-line-v2 {
    position: absolute;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent-color), transparent);
    box-shadow: 0 0 15px var(--accent-color);
    top: -10%;
    animation: scanV2 3s linear infinite;
    z-index: 25;
}

@keyframes scanV2 {
    0% {
        top: -10%;
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    90% {
        opacity: 1;
    }

    100% {
        top: 110%;
        opacity: 0;
    }
}

/* Tablet / Desktop */
@media (min-width: 600px) {
    #app {
        margin: 40px auto;
        padding: 50px 40px;
    }
}

/* Joseon Theme Styles */
.joseon-theme-active #app {
    background-color: var(--joseon-bg);
    background-image: url('https://www.transparenttextures.com/patterns/natural-paper.webp');
    /* Hanji-like texture */
    border: 1px solid #d3c4a9;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.joseon-theme-active .main-header {
    background-color: #f4f1ea;
    border-bottom: 1px solid #d3c4a9;
}

.joseon-theme-active .logo-text,
.joseon-theme-active .nav-item:hover {
    color: var(--joseon-ink);
}

.ink-title {
    font-family: 'Gungsuh', 'GungsuhChe', serif;
    color: var(--joseon-ink);
    font-size: 2.2rem;
    margin-bottom: 5px;
    letter-spacing: 2px;
}

.joseon-main-frame {
    margin: 30px auto;
    padding: 2px;
    border: 2px solid #333;
    display: inline-block;
    background: white;
    max-width: 100%;
}

.joseon-title-img {
    width: 100%;
    max-width: 400px;
    height: auto;
    display: block;
}

.joseon-btn {
    background: var(--joseon-ink) !important;
    color: white !important;
    font-family: 'Gungsuh', serif;
    border-radius: 4px !important;
    padding: 15px 30px !important;
    font-size: 1.1rem !important;
}

.joseon-loading #analyze-btn {
    display: none;
}

.joseon-loading .loading-text {
    font-family: 'Gungsuh', serif;
    font-size: 1.2rem;
    color: var(--joseon-ink);
}

/* Joseon Result Styling */
.joseon-res-title {
    font-family: 'Gungsuh', serif;
    font-size: 2rem;
    color: var(--joseon-ink);
    margin-top: 10px;
}

.joseon-tags {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 5px;
}

.joseon-tag {
    font-size: 0.9rem;
    color: #666;
}

.joseon-result-card {
    background: white;
    padding: 35px 25px;
    border: 1px solid #ddd;
    margin-top: 20px;
    position: relative;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.05);
}

.joseon-portrait {
    width: 260px;
    height: 340px;
    margin: 0 auto 30px;
    border: 1px solid #333;
    padding: 8px;
    background: #f9f9f9;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.joseon-portrait img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.joseon-chart-container {
    margin: -10px auto 10px;
    width: 160px;
    height: 160px;
    display: flex;
    justify-content: center;
    align-items: center;
}

#joseon-radar-chart {
    width: 100%;
    height: 100%;
}

.joseon-desc-box {
    margin-top: 20px;
    padding: 20px;
    border: 1px dashed #d3c4a9;
    background: rgba(244, 241, 234, 0.4);
    text-align: left;
}

.ink-text {
    font-family: 'Pretendard', -apple-system, sans-serif;
    line-height: 1.8;
    font-size: 1rem;
    color: #333;
    font-weight: 500;
    word-break: keep-all;
    /* Prevent awkward line breaks in Korean */
}

.joseon-share-btn {
    border-radius: 4px !important;
    border-color: #333 !important;
}

/* Face Tier Specific Styles */
.facetier-title {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: 3px;
    background: linear-gradient(135deg, #fff, #888);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 15px;
}

.facetier-main-frame {
    margin: 40px 0;
}

.face-scanner-ui {
    width: 150px;
    height: 180px;
    margin: 0 auto;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 40% 40% 50% 50%;
    padding: 20px;
}

.scan-line-deco {
    width: 100%;
    height: 2px;
    background: #fff;
    position: absolute;
    top: 50%;
    left: 0;
    box-shadow: 0 0 15px #fff;
    opacity: 0.3;
}

.facetier-btn {
    background: #fff !important;
    color: #000 !important;
    font-family: 'Inter', sans-serif;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 10px 30px rgba(255, 255, 255, 0.1);
    border: none !important;
}

.facetier-btn:hover {
    background: #eee !important;
    box-shadow: 0 15px 40px rgba(255, 255, 255, 0.2);
}

/* Face Tier Result Card */
.facetier-card-premium {
    background: linear-gradient(145deg, #1f1f1f, #111);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 50px 30px;
    margin-top: 20px;
    position: relative;
    overflow: hidden;
    text-align: center;
}

.tier-label {
    font-size: 0.8rem;
    color: #888;
    letter-spacing: 4px;
    margin-bottom: 15px;
}

.tier-percent {
    font-family: 'Playfair Display', serif;
    font-size: 3.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #ffffff, #888);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.2;
}

.tier-image-box {
    width: 180px;
    height: 180px;
    margin: 30px auto 10px;
    border-radius: 18px;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.tier-image-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tier-info-box {
    margin: 40px 0;
}

.tier-title {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    color: #fff;
    margin-bottom: 10px;
}

.tier-desc {
    font-size: 0.95rem;
    color: #aaa;
    line-height: 1.6;
}

.tier-watermark {
    position: absolute;
    bottom: 15px;
    right: 20px;
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.2);
    letter-spacing: 1px;
}

.facetier-share-btn {
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: #fff !important;
}

.facetier-share-btn:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    border-color: #fff !important;
}

#babyface-age-input .title-container h2 {
    color: #40C057;
}

#babyface-age-input {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all 0.5s ease;
}

.age-comparison-box {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 20px;
    border: 1px solid #eee;
}

.age-item span:last-child {
    display: block;
    line-height: 1;
}

.timeline-bar::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    height: 4px;
    background: #e9ecef;
    border-radius: 2px;
}

#timeline-real-dot::after {
    background: #aaa;
}

#timeline-ai-dot::after {
    background: var(--accent-color);
}

/* Chrome, Safari, Edge, Opera */
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    appearance: none;
    margin: 0;
}

/* Firefox */
input[type=number] {
    -moz-appearance: textfield;
    appearance: textfield;
}

@media (max-width: 600px) {
    .facetier-title {
        font-size: 2rem;
    }

    .tier-percent {
        font-size: 2.8rem;
    }
}