/* ============================================================
   Sistem Klasifikasi Motif Batik Indonesia
   Custom Stylesheet
   ============================================================ */

/* ============================================================
   CSS VARIABLES / DESIGN TOKENS
   ============================================================ */
:root {
    /* Primary Colors - Batik-inspired warm palette */
    --primary: #C8915F;
    --primary-light: #E4B98A;
    --primary-dark: #9A6B3A;
    --primary-glow: rgba(200, 145, 95, 0.3);

    /* Accent Colors */
    --accent: #D4A574;
    --accent-secondary: #8B6F47;

    /* Background Colors - Deep dark theme */
    --bg-primary: #0D0D12;
    --bg-secondary: #141420;
    --bg-tertiary: #1A1A2E;
    --bg-card: rgba(26, 26, 46, 0.7);
    --bg-card-hover: rgba(36, 36, 60, 0.8);

    /* Text Colors */
    --text-primary: #F0ECE3;
    --text-secondary: #A8A4B8;
    --text-muted: #6E6A82;

    /* Glassmorphism */
    --glass-bg: rgba(255, 255, 255, 0.04);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);

    /* Status Colors */
    --success: #4ADE80;
    --warning: #FBBF24;
    --danger: #F87171;
    --info: #60A5FA;

    /* Transitions */
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);

    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 50%;
}

/* ============================================================
   RESET & BASE
   ============================================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background-image: url('/static/images/megamendung_pattern.png');
    background-size: 800px auto;
    background-repeat: repeat;
    background-blend-mode: screen;
    background-attachment: fixed;
}

::selection {
    background: var(--primary);
    color: #fff;
}

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-dark);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* ============================================================
   NAVBAR
   ============================================================ */
#mainNavbar {
    background: rgba(13, 13, 18, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    padding: 12px 0;
    transition: var(--transition-normal);
    z-index: 1050;
}

#mainNavbar.scrolled {
    background: rgba(13, 13, 18, 0.95);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.brand-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: #fff;
}

.brand-text {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: 1.3rem;
    color: var(--text-primary);
    display: block;
    line-height: 1.2;
}

.brand-sub {
    font-size: 0.65rem;
    color: var(--primary);
    font-weight: 500;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.navbar-nav .nav-link {
    color: var(--text-secondary) !important;
    font-weight: 500;
    font-size: 0.9rem;
    padding: 6px 16px !important;
    border-radius: var(--radius-sm);
    transition: var(--transition-fast);
}

.navbar-nav .nav-link:hover {
    color: var(--primary-light) !important;
    background: rgba(200, 145, 95, 0.1);
}

/* ============================================================
   HERO SECTION
   ============================================================ */
.hero-section {
    position: relative;
    background: linear-gradient(135deg, #0D0D12 0%, #1A1A2E 40%, #16213E 100%);
    overflow: hidden;
    min-height: 100vh;
}

/* Megamendung Batik Pattern Overlay on Hero */
.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('/static/images/megamendung_pattern.png');
    background-size: 600px auto;
    background-repeat: repeat;
    opacity: 0.05;
    z-index: 0;
    pointer-events: none;
    mix-blend-mode: screen;
}

.hero-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at 30% 50%, rgba(200, 145, 95, 0.08) 0%, transparent 70%);
    z-index: 2;
}

.hero-section .container {
    z-index: 3;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(200, 145, 95, 0.12);
    border: 1px solid rgba(200, 145, 95, 0.25);
    color: var(--primary-light);
    padding: 8px 18px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.5px;
}

.hero-title {
    font-family: 'Playfair Display', serif;
    font-weight: 800;
    font-size: clamp(2rem, 5vw, 3.5rem);
    line-height: 1.2;
    color: var(--text-primary);
    margin-bottom: 1.2rem;
}

.hero-highlight {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-desc {
    font-size: 1rem;
    color: var(--text-secondary);
    max-width: 540px;
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.hero-desc strong {
    color: var(--primary-light);
}

/* Hero Buttons */
.btn-hero-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
    padding: 14px 32px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    transition: var(--transition-normal);
    border: none;
    box-shadow: 0 4px 20px rgba(200, 145, 95, 0.3);
}

.btn-hero-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(200, 145, 95, 0.4);
    color: #fff;
}

.btn-hero-outline {
    background: transparent;
    color: var(--text-secondary);
    padding: 14px 32px;
    border-radius: 50px;
    font-weight: 500;
    font-size: 0.95rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    transition: var(--transition-normal);
    border: 1px solid var(--glass-border);
}

.btn-hero-outline:hover {
    color: var(--primary-light);
    border-color: var(--primary);
    background: rgba(200, 145, 95, 0.06);
}

/* Hero Stats */
.hero-stats {
    padding-top: 1rem;
    border-top: 1px solid var(--glass-border);
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.stat-number {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-light);
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Hero Visual / Floating Cards */
.hero-visual {
    position: relative;
    width: 100%;
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.floating-card {
    position: absolute;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-primary);
    font-weight: 500;
    font-size: 0.9rem;
    animation: float 6s ease-in-out infinite;
    z-index: 4;
}

.floating-card i {
    font-size: 1.2rem;
    color: var(--primary);
}

.card-1 {
    top: 15%;
    left: 5%;
    animation-delay: 0s;
}

.card-2 {
    top: 50%;
    right: 5%;
    animation-delay: 2s;
}

.card-3 {
    bottom: 15%;
    left: 15%;
    animation-delay: 4s;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-15px);
    }
}

.hero-circle {
    position: absolute;
    border-radius: 50%;
    border: 1px solid rgba(200, 145, 95, 0.15);
}

.circle-outer {
    width: 280px;
    height: 280px;
    animation: spin 20s linear infinite;
}

.circle-inner {
    width: 180px;
    height: 180px;
    border-color: rgba(200, 145, 95, 0.1);
    animation: spin 15s linear infinite reverse;
}

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

    to {
        transform: rotate(360deg);
    }
}

.hero-ai-icon {
    position: absolute;
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: #fff;
    box-shadow: 0 0 40px rgba(200, 145, 95, 0.3);
    z-index: 5;
}

/* Hero Wave */
.hero-wave {
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    z-index: 3;
}

.hero-wave svg {
    display: block;
    width: 100%;
}

/* ============================================================
   SECTION COMMON
   ============================================================ */
.section-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(200, 145, 95, 0.1);
    border: 1px solid rgba(200, 145, 95, 0.2);
    color: var(--primary);
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 500;
    margin-bottom: 1rem;
}

.section-title {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.section-desc {
    color: var(--text-secondary);
    font-size: 0.95rem;
    max-width: 600px;
    margin: 0 auto;
}

/* ============================================================
   SCANNER SECTION
   ============================================================ */
.scanner-section {
    padding: 80px 0 60px;
    background: var(--bg-primary);
    position: relative;
}

.scanner-card {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--glass-shadow);
}

/* Scanner Tabs */
.scanner-tabs {
    display: flex;
    border-bottom: 1px solid var(--glass-border);
}

.scanner-tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 18px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition-fast);
    position: relative;
}

.scanner-tab::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
    border-radius: 3px 3px 0 0;
    transition: var(--transition-normal);
}

.scanner-tab.active {
    color: var(--primary-light);
    background: rgba(200, 145, 95, 0.05);
}

.scanner-tab.active::after {
    width: 60%;
}

.scanner-tab:hover {
    color: var(--primary);
    background: rgba(200, 145, 95, 0.03);
}

.scanner-tab i {
    font-size: 1.1rem;
}

/* Scanner Panels */
.scanner-panel {
    display: none;
    padding: 24px;
}

.scanner-panel.active {
    display: block;
}

/* Upload Zone */
.upload-zone {
    border: 2px dashed rgba(200, 145, 95, 0.25);
    border-radius: var(--radius-lg);
    background: rgba(200, 145, 95, 0.03);
    min-height: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.upload-zone:hover {
    border-color: var(--primary);
    background: rgba(200, 145, 95, 0.06);
}

.upload-zone.drag-over {
    border-color: var(--primary-light);
    background: rgba(200, 145, 95, 0.1);
    transform: scale(1.01);
}

.upload-content {
    text-align: center;
    padding: 30px;
}

.upload-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: rgba(200, 145, 95, 0.1);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--primary);
    transition: var(--transition-normal);
}

.upload-zone:hover .upload-icon {
    transform: scale(1.1);
    background: rgba(200, 145, 95, 0.15);
}

.upload-content h4 {
    color: var(--text-primary);
    font-weight: 600;
    margin-bottom: 6px;
}

.upload-content p {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.upload-formats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
    flex-wrap: wrap;
}

.upload-formats span {
    background: rgba(255, 255, 255, 0.06);
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 0.7rem;
    color: var(--text-muted);
    font-weight: 500;
    letter-spacing: 0.5px;
}

.upload-formats .upload-size {
    background: rgba(200, 145, 95, 0.1);
    color: var(--primary);
}

/* Preview */
.preview-container {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.preview-container img {
    max-width: 100%;
    max-height: 320px;
    border-radius: var(--radius-md);
    object-fit: contain;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.4);
}

.preview-remove {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    background: rgba(248, 113, 113, 0.9);
    border: none;
    border-radius: var(--radius-full);
    color: #fff;
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
    z-index: 5;
}

.preview-remove:hover {
    background: var(--danger);
    transform: scale(1.1);
}

.preview-info {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 0.75rem;
    color: var(--text-secondary);
    white-space: nowrap;
}

/* Camera Zone */
.camera-zone {
    border-radius: var(--radius-lg);
    background: #000;
    min-height: 280px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.camera-zone video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--radius-lg);
    display: none;
}

.camera-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    z-index: 2;
}

.camera-frame {
    width: 200px;
    height: 200px;
    border: 2px solid rgba(200, 145, 95, 0.5);
    border-radius: var(--radius-lg);
    box-shadow: 0 0 0 2000px rgba(0, 0, 0, 0.3);
    animation: pulse-frame 2s ease-in-out infinite;
}

@keyframes pulse-frame {

    0%,
    100% {
        border-color: rgba(200, 145, 95, 0.3);
    }

    50% {
        border-color: rgba(200, 145, 95, 0.7);
    }
}

.camera-placeholder {
    position: absolute;
    inset: 0;
    text-align: center;
    color: var(--text-muted);
    padding: 20px;
    width: 100%;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

.camera-placeholder-guide {
    width: min(260px, 80%);
    min-height: 190px;
    padding: 24px;
    border: 2px solid rgba(200, 145, 95, 0.55);
    border-radius: var(--radius-lg);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    background: rgba(200, 145, 95, 0.025);
}

.camera-placeholder p {
    margin: 0;
    white-space: normal;
    word-wrap: break-word;
    font-size: 0.9rem;
    padding: 0;
    max-width: 210px;
}

.camera-placeholder i {
    font-size: 3rem;
    margin: 0;
    display: inline-flex;
    color: var(--text-muted);
}

.camera-controls {
    display: flex;
    justify-content: center;
    gap: 12px;
    padding: 16px;
    flex-wrap: wrap;
}

.btn-camera-action {
    padding: 10px 24px;
    border-radius: 50px;
    border: 1px solid var(--glass-border);
    background: var(--glass-bg);
    color: var(--text-primary);
    font-weight: 500;
    font-size: 0.85rem;
    cursor: pointer;
    transition: var(--transition-fast);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-camera-action:hover {
    background: rgba(200, 145, 95, 0.1);
    border-color: var(--primary);
    color: var(--primary-light);
}

.btn-capture {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
    border-color: transparent;
}

.btn-capture:hover {
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    color: #fff;
}

.btn-stop {
    border-color: rgba(248, 113, 113, 0.3);
    color: var(--danger);
}

.btn-stop:hover {
    background: rgba(248, 113, 113, 0.1);
    border-color: var(--danger);
}

.camera-preview-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
    z-index: 3;
}

.camera-preview-container img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* Scanner Action */
.scanner-action {
    padding: 20px 24px;
    border-top: 1px solid var(--glass-border);
}

.btn-analyze {
    width: 100%;
    padding: 16px;
    border: none;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.btn-analyze:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.btn-analyze:not(:disabled):hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(200, 145, 95, 0.3);
}

.btn-analyze-content,
.btn-analyze-loading {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

/* ============================================================
   RESULT SECTION
   ============================================================ */
.result-card {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    padding: 32px;
    box-shadow: var(--glass-shadow);
    animation: slideUp 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

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

.result-header {
    text-align: center;
    margin-bottom: 28px;
}

.result-header-icon {
    width: 60px;
    height: 60px;
    background: rgba(74, 222, 128, 0.12);
    border-radius: var(--radius-full);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: var(--success);
    margin-bottom: 12px;
}

.result-header h3 {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: 1.5rem;
}

.demo-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(251, 191, 36, 0.1);
    color: var(--warning);
    padding: 6px 14px;
    border-radius: 50px;
    font-size: 0.75rem;
    margin-top: 8px;
}

/* Result Image Card */
.result-image-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.result-image-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.result-main-prediction {
    padding: 20px;
}

.prediction-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--primary);
    font-weight: 600;
}

.prediction-name {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: 1.4rem;
    margin: 4px 0 12px;
    color: var(--text-primary);
}

.confidence-display {
    display: flex;
    align-items: center;
    gap: 12px;
}

.confidence-bar-wrapper {
    flex: 1;
    height: 8px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 4px;
    overflow: hidden;
}

.confidence-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--success));
    border-radius: 4px;
    transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
    width: 0%;
}

.confidence-value {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--success);
    min-width: 60px;
    text-align: right;
}

/* Top 3 Card */
.top3-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 20px;
}

.top3-card h5 {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
}

.top3-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.top3-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.top3-rank {
    width: 28px;
    height: 28px;
    background: rgba(200, 145, 95, 0.12);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--primary);
    flex-shrink: 0;
}

.top3-rank.rank-1 {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
}

.top3-name {
    flex: 1;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-primary);
}

.top3-confidence {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.top3-bar-wrapper {
    flex: 1;
    height: 4px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 2px;
    overflow: hidden;
    min-width: 60px;
}

.top3-bar {
    height: 100%;
    background: var(--primary);
    border-radius: 2px;
    transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Info Card */
.info-card {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.info-item {
    display: flex;
    gap: 16px;
    padding: 18px 20px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    margin-bottom: 12px;
    transition: var(--transition-fast);
}

.info-item:hover {
    background: rgba(200, 145, 95, 0.04);
    border-color: rgba(200, 145, 95, 0.15);
}

.info-icon {
    width: 44px;
    height: 44px;
    background: rgba(200, 145, 95, 0.1);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--primary);
    flex-shrink: 0;
}

.info-item h5 {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.info-item p {
    font-size: 0.88rem;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.7;
}

/* Informasi budaya dipisahkan secara visual dari keluaran model. */
.culture-card {
    margin-top: 4px;
    padding: 20px;
    border: 1px solid rgba(200, 145, 95, 0.25);
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, rgba(200, 145, 95, 0.08), rgba(255, 255, 255, 0.02));
}

.culture-heading {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
}

.culture-heading-icon {
    width: 42px;
    height: 42px;
    border-radius: var(--radius-sm);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-light);
    background: rgba(200, 145, 95, 0.14);
    flex-shrink: 0;
}

.culture-heading span {
    display: block;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.92rem;
}

.culture-heading small {
    display: block;
    color: var(--text-muted);
    font-size: 0.72rem;
    margin-top: 2px;
}

.culture-detail {
    padding: 12px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.055);
}

.culture-detail h5 {
    margin: 0 0 5px;
    color: var(--primary);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.culture-detail p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.86rem;
    line-height: 1.65;
}

.culture-source {
    margin-top: 8px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--primary-light);
    font-size: 0.78rem;
    text-decoration: none;
}

.culture-source:hover {
    color: #fff;
    text-decoration: underline;
}

/* Result Actions */
.result-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.btn-result-action {
    flex: 1;
    padding: 12px 20px;
    border-radius: var(--radius-md);
    border: 1px solid var(--glass-border);
    background: var(--glass-bg);
    color: var(--text-primary);
    font-weight: 500;
    font-size: 0.85rem;
    cursor: pointer;
    transition: var(--transition-fast);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-result-action:hover {
    background: rgba(200, 145, 95, 0.1);
    border-color: var(--primary);
    color: var(--primary-light);
}

/* Error Card */
.error-card {
    display: flex;
    align-items: center;
    gap: 16px;
    background: rgba(248, 113, 113, 0.08);
    border: 1px solid rgba(248, 113, 113, 0.2);
    border-radius: var(--radius-md);
    padding: 16px 20px;
    animation: slideUp 0.4s ease;
}

.error-icon {
    width: 44px;
    height: 44px;
    background: rgba(248, 113, 113, 0.15);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--danger);
    flex-shrink: 0;
}

.error-content {
    flex: 1;
}

.error-content h5 {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--danger);
    margin-bottom: 2px;
}

.error-content p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin: 0;
}

.error-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    font-size: 1rem;
    transition: var(--transition-fast);
}

.error-close:hover {
    color: var(--danger);
}

/* ============================================================
   ABOUT SECTION
   ============================================================ */
.about-section {
    padding: 80px 0;
    background: var(--bg-secondary);
    position: relative;
}

.about-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('/static/images/megamendung_pattern.png');
    background-size: 700px auto;
    background-repeat: repeat;
    opacity: 0.05;
    z-index: 0;
    pointer-events: none;
    mix-blend-mode: screen;
}

.about-section>* {
    position: relative;
    z-index: 1;
}

/* Feature Cards */
.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 32px 24px;
    text-align: center;
    transition: var(--transition-normal);
    height: 100%;
}

.feature-card:hover {
    transform: translateY(-5px);
    border-color: rgba(200, 145, 95, 0.2);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.feature-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, rgba(200, 145, 95, 0.15), rgba(200, 145, 95, 0.05));
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: var(--primary);
    margin: 0 auto 20px;
}

.feature-card h4 {
    font-weight: 600;
    font-size: 1.05rem;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.feature-card p {
    color: var(--text-secondary);
    font-size: 0.88rem;
    line-height: 1.6;
    margin: 0;
}

/* Research evidence */
.research-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-top: 28px;
}

.research-card {
    display: flex;
    min-height: 150px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 24px 18px;
    text-align: center;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
}

.research-value {
    font-family: 'Playfair Display', serif;
    font-size: 1.65rem;
    font-weight: 700;
    color: var(--primary-light);
}

.research-card strong {
    color: var(--text-primary);
    font-size: 0.92rem;
}

.research-card small,
.dataset-source {
    color: var(--text-muted);
    font-size: 0.78rem;
}

.dataset-source a {
    color: var(--primary-light);
    text-underline-offset: 3px;
}

.model-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 14px;
    padding: 10px 14px;
    border-radius: var(--radius-md);
    font-size: 0.82rem;
}

.model-status-error {
    color: #ffd2d2;
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.35);
}

/* Motif Grid */
.motif-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.motif-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--glass-border);
    padding: 8px 18px;
    border-radius: 50px;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: var(--transition-fast);
    cursor: default;
}

.motif-chip:hover {
    background: rgba(200, 145, 95, 0.1);
    border-color: rgba(200, 145, 95, 0.3);
    color: var(--primary-light);
    transform: translateY(-2px);
}

.motif-chip i {
    color: var(--primary);
    font-size: 0.9rem;
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
    background: var(--bg-primary);
    border-top: 1px solid var(--glass-border);
    padding: 40px 0 30px;
}

.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: 1.3rem;
    color: var(--text-primary);
}

.footer-brand i {
    color: var(--primary);
    font-size: 1.5rem;
}

.footer-text {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 6px;
}

.footer-credit {
    color: var(--text-muted);
    font-size: 0.75rem;
    opacity: 0.7;
}

/* ============================================================
   LOADING OVERLAY
   ============================================================ */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(13, 13, 18, 0.92);
    backdrop-filter: blur(10px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-overlay.active {
    display: flex;
}

.loading-content {
    text-align: center;
    padding: 40px;
}

.loading-spinner {
    width: 100px;
    height: 100px;
    position: relative;
    margin: 0 auto 24px;
}

.spinner-ring {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 3px solid transparent;
    border-radius: 50%;
}

.spinner-ring:nth-child(1) {
    border-top-color: var(--primary);
    animation: spin 1.2s linear infinite;
}

.spinner-ring:nth-child(2) {
    border-right-color: var(--primary-light);
    animation: spin 1.6s linear infinite reverse;
}

.spinner-ring:nth-child(3) {
    border-bottom-color: var(--accent);
    animation: spin 2s linear infinite;
}

.spinner-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.8rem;
    color: var(--primary);
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 0.5;
        transform: translate(-50%, -50%) scale(0.9);
    }

    50% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.1);
    }
}

.loading-content h4 {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.loading-content>p {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.loading-steps {
    margin-top: 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    text-align: left;
    max-width: 220px;
    margin-left: auto;
    margin-right: auto;
}

.loading-step {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.82rem;
    color: var(--text-muted);
    transition: var(--transition-fast);
}

.loading-step.active {
    color: var(--primary-light);
}

.loading-step.done {
    color: var(--success);
}

.loading-step.done i::before {
    content: "\F26A";
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

/* Tablet */
@media (max-width: 991.98px) {
    .hero-section {
        min-height: auto;
        padding-top: 100px;
        padding-bottom: 80px;
    }

    .hero-section .row {
        min-height: auto;
    }

    .hero-title {
        font-size: 2rem;
    }

    .research-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Mobile */
@media (max-width: 767.98px) {
    .hero-section {
        padding-top: 90px;
        padding-bottom: 60px;
    }

    .hero-title {
        font-size: 1.6rem;
    }

    .hero-desc {
        font-size: 0.9rem;
    }

    .hero-actions {
        flex-direction: column;
    }

    .btn-hero-primary,
    .btn-hero-outline {
        width: 100%;
        justify-content: center;
    }

    .hero-stats {
        gap: 20px !important;
    }

    .scanner-tab span {
        display: none;
    }

    .scanner-tab i {
        font-size: 1.3rem;
    }

    .upload-zone {
        min-height: 220px;
    }

    .result-card {
        padding: 20px;
    }

    .info-item {
        padding: 14px;
    }

    .info-icon {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }

    .navbar-nav {
        gap: 4px !important;
    }

    .navbar-nav .nav-link {
        padding: 6px 10px !important;
        font-size: 0.8rem;
    }

    .section-title {
        font-size: 1.4rem;
    }

    .motif-chip {
        padding: 6px 14px;
        font-size: 0.75rem;
    }

    .research-grid {
        grid-template-columns: 1fr;
    }

    .camera-controls {
        flex-direction: column;
    }

    .btn-camera-action {
        width: 100%;
        justify-content: center;
    }
}

/* Small Mobile */
@media (max-width: 375px) {
    .hero-title {
        font-size: 1.4rem;
    }

    .hero-badge {
        font-size: 0.7rem;
    }

    .brand-text {
        font-size: 1.1rem;
    }
}
