        :root {

            --bg: #f5f7fb;
            --surface: #ffffff;
            --surface-soft: #f8fafc;

            --text: #172033;
            --text-soft: #64748b;
            --border: #e2e8f0;

            --primary: #2563eb;
            --primary-soft: #eff6ff;

            --green: #16a34a;
            --green-soft: #f0fdf4;

            --red: #ef4444;
            --orange: #f59e0b;
            --purple: #7c3aed;

            --shadow:
                0 10px 35px rgba(15, 23, 42, 0.07);

            --radius: 18px;

            --accent-indigo: #4f46e5;
            --accent-cyan: #0284c7;
            --accent-emerald: #059669;
            --accent-rose: #e11d48;
            --accent-amber: #d97706;

            --shadow-lg: 0 20px 40px -15px rgba(0, 0, 0, 0.5), 0 0 30px rgba(79, 70, 229, 0.05);
            --shadow-glow: 0 0 20px rgba(99, 102, 241, 0.25);

            --status-bg: rgba(15, 23, 42, 0.6);

            --border-color: rgba(0, 0, 0, 0.08);
            --border-dashed: #cbd5e1;
            --border-highlight: rgba(79, 70, 229, 0.3);
            --glass-backdrop: blur(16px) saturate(180%);
        }


        [data-theme="dark"] {

            --bg: #0b1120;
            --surface: #111827;
            --surface-soft: #172033;

            --text: #f1f5f9;
            --text-soft: #94a3b8;
            --border: #273449;

            --primary: #60a5fa;
            --primary-soft: #172554;

            --green: #4ade80;
            --green-soft: #052e16;

            --shadow:
                0 15px 40px rgba(0, 0, 0, 0.3);

            --accent-indigo: #6366f1;
            --accent-cyan: #06b6d4;
            --accent-emerald: #10b981;
            --accent-rose: #f43f5e;
            --accent-amber: #f59e0b;

            --shadow-lg: 0 20px 40px -15px rgba(0, 0, 0, 0.5), 0 0 30px rgba(79, 70, 229, 0.05);
            --shadow-glow: 0 0 20px rgba(99, 102, 241, 0.25);

            --status-bg: rgba(15, 23, 42, 0.6);
            --border-color: rgba(255, 255, 255, 0.08);
            --border-dashed: rgba(255, 255, 255, 0.15);
            --border-highlight: rgba(99, 102, 241, 0.3);
        }

        /* =====================================================
           PAGE
        ===================================================== */

        .analysis-page {
            max-width: 1400px;
            margin: auto;
            padding: 40px 30px 70px;
        }


        /* =====================================================
           BACK BUTTON
        ===================================================== */

        .header-right {

            display: flex;
            align-items: center;
            gap: 18px;
        }


        .back-dashboard {

            color: var(--text-soft);

            text-decoration: none;

            font-size: 13px;
            font-weight: 600;

            padding: 9px 13px;

            border-radius: 10px;

            transition: .2s;
        }


        .back-dashboard:hover {

            color: var(--primary);
            background: var(--primary-soft);
        }

        /* =====================================================
           PAGE HEADER
        ===================================================== */

        .analysis-header {

            display: flex;
            justify-content: space-between;
            align-items: flex-end;

            gap: 30px;

            margin-bottom: 35px;
        }

        .analysis-header-left {
            max-width: 800px;
        }

        .analysis-label {

            display: inline-block;

            font-size: 12px;
            font-weight: 700;

            letter-spacing: 1.5px;

            margin-bottom: 10px;

            opacity: .65;
        }

        .analysis-header h2 {

            margin: 0 0 12px;

            font-size: 38px;
            line-height: 1.15;
        }

        .analysis-header h2 span {
            color: #06a6a6;
        }

        .analysis-header p {

            margin: 0;

            font-size: 16px;
            line-height: 1.7;

            opacity: .7;
        }


        /* =====================================================
           MAIN GRID
        ===================================================== */

        .analysis-grid {

            display: grid;

            grid-template-columns:
                360px 1fr;

            gap: 25px;

            align-items: start;
        }


        /* =====================================================
           CONTROL CARD
        ===================================================== */

        .control-card,
        .result-card {

            border-radius: 20px;

            padding: 25px;

            border: 1px solid rgba(128, 128, 128, .18);

            background: var(--surface);

            box-shadow: var(--shadow);

            backdrop-filter: var(--glass-backdrop);
        }



        /* =====================================================
           CARD HEADER
        ===================================================== */

        .card-heading {

            display: flex;
            align-items: center;
            gap: 12px;

            margin-bottom: 22px;
        }

        .card-heading-icon {

            width: 42px;
            height: 42px;

            display: flex;
            align-items: center;
            justify-content: center;

            border-radius: 12px;

            background:
                linear-gradient(135deg,
                    #6c5ce7,
                    #00b894);

            color: white;

            font-size: 13px;
            font-weight: 800;
        }

        .card-heading h3 {

            margin: 0;

            font-size: 17px;
        }

        .card-heading span {

            display: block;

            font-size: 12px;

            margin-top: 3px;

            opacity: .55;
        }


        /* =====================================================
           FORM
        ===================================================== */

        .form-group {
            margin-bottom: 22px;
        }

        .form-group label {

            display: block;

            font-size: 13px;
            font-weight: 700;

            margin-bottom: 9px;
        }

        .model-select {

            width: 100%;

            padding: 13px 14px;

            border-radius: 11px;

            border: 1px solid rgba(128, 128, 128, .25);

            background: var(--bg);

            font-size: 14px;

            color: var(--text);

            outline: none;
        }


        /* =====================================================
           MODEL DESCRIPTION
        ===================================================== */

        .model-description {

            padding: 13px;

            border-radius: 12px;

            background:
                rgba(108, 92, 231, .07);

            border: 1px solid rgba(108, 92, 231, .12);

            font-size: 12px;

            line-height: 1.6;

            opacity: .75;

            margin-bottom: 22px;
        }


        /* =====================================================
           UPLOAD
        ===================================================== */

        .upload-area {

            border: 2px dashed rgba(108, 92, 231, .35);

            border-radius: 15px;

            padding: 28px 15px;

            text-align: center;

            cursor: pointer;

            transition: .25s;
        }

        .upload-area:hover {

            border-color:
                #6c5ce7;

            background:
                rgba(108, 92, 231, .05);
        }

        .upload-icon {

            font-size: 30px;

            margin-bottom: 10px;
        }

        .upload-area strong {

            display: block;

            font-size: 14px;

            margin-bottom: 5px;
        }

        .upload-area small {

            opacity: .55;

            font-size: 11px;
        }

        #imageInput {
            display: none;
        }


        /* =====================================================
           FILE NAME
        ===================================================== */

        .file-name {

            margin-top: 10px;

            font-size: 12px;

            text-align: center;

            opacity: .65;
        }


        /* =====================================================
           BUTTON
        ===================================================== */

        .run-button {

            width: 100%;

            margin-top: 20px;

            padding: 14px;

            border: none;

            border-radius: 12px;

            background:
                linear-gradient(135deg,
                    #6c5ce7,
                    #00b894);

            color: white;

            font-size: 14px;
            font-weight: 700;

            cursor: pointer;

            transition: .25s;
        }

        .run-button:hover {

            transform: translateY(-2px);

            box-shadow:
                0 10px 25px rgba(108, 92, 231, .25);
        }

        .run-button:disabled {

            opacity: .5;

            cursor: not-allowed;

            transform: none;
        }


        /* =====================================================
           RESULT AREA
        ===================================================== */

        .result-placeholder {

            min-height: 500px;

            display: flex;

            align-items: center;

            justify-content: center;

            text-align: center;

            opacity: .5;
        }

        .placeholder-icon {

            font-size: 55px;

            margin-bottom: 15px;
        }

        .result-placeholder h3 {
            margin: 0 0 7px;
        }

        .result-placeholder p {

            margin: 0;

            font-size: 13px;
        }


        /* =====================================================
           RESULTS
        ===================================================== */

        .results {

            display: none;
        }

        .result-title {

            display: flex;

            justify-content: space-between;

            align-items: center;

            margin-bottom: 20px;
        }

        .result-title h3 {
            margin: 0;
        }

        .model-badge {

            padding: 7px 11px;

            border-radius: 20px;

            background:
                rgba(0, 184, 148, .1);

            color:
                #00a884;

            font-size: 11px;

            font-weight: 700;
        }


        /* =====================================================
           IMAGE RESULTS
        ===================================================== */

        .image-results {

            display: grid;

            grid-template-columns:
                repeat(3, 1fr);

            gap: 15px;
        }

        .result-image-card {

            border-radius: 14px;

            overflow: hidden;

            border:
                1px solid rgba(128, 128, 128, .15);

            background:
                rgba(128, 128, 128, .04);
        }

        .result-image-card img {

            display: block;

            width: 100%;

            aspect-ratio: 1 / 1;

            object-fit: contain;

            background: #111;
        }

        .result-image-card span {

            display: block;

            padding: 11px;

            font-size: 12px;

            font-weight: 700;

            text-align: center;
        }


        /* =====================================================
           STATS
        ===================================================== */

        .segmentation-stats {

            display: grid;

            grid-template-columns:
                repeat(3, 1fr);

            gap: 12px;

            margin-top: 20px;
        }

        .stat-box {

            padding: 16px;

            border-radius: 13px;

            background:
                rgba(108, 92, 231, .07);

            text-align: center;
        }

        .stat-box strong {

            display: block;

            font-size: 20px;

            margin-bottom: 5px;
        }

        .stat-box span {

            font-size: 11px;

            opacity: .55;
        }


        /* =====================================================
           LOADING
        ===================================================== */

        .loading {

            display: none;

            text-align: center;

            padding: 80px 20px;
        }

        .spinner {

            width: 42px;
            height: 42px;

            margin: 0 auto 15px;

            border-radius: 50%;

            border: 4px solid rgba(108, 92, 231, .15);

            border-top-color:
                #6c5ce7;

            animation:
                spin 1s linear infinite;
        }

        @keyframes spin {

            to {
                transform: rotate(360deg);
            }

        }


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

        @media(max-width: 950px) {

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

            .image-results {
                grid-template-columns: 1fr;
            }

        }

        @media(max-width: 600px) {

            .analysis-page {
                padding: 25px 15px;
            }

            .analysis-header h2 {
                font-size: 29px;
            }

            .segmentation-stats {
                grid-template-columns: 1fr;
            }

        }