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

        :root {
            --bg: #0a0f1e;
            --surface: #111827;
            --surface2: #1a2235;
            --border: rgba(99, 179, 237, 0.15);
            --accent: #3b82f6;
            --accent2: #8b5cf6;
            --success: #10b981;
            --error: #ef4444;
            --text: #f1f5f9;
            --muted: #94a3b8;
        }

        body {
            font-family: 'Inter', sans-serif;
            background: var(--bg);
            color: var(--text);
            min-height: 100vh;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            padding: 2rem 1rem;
        }

        /* --- ARKAPLAN ANIMASYONU --- */
        body::before {
            content: '';
            position: fixed;
            inset: 0;
            background:
                radial-gradient(ellipse 80% 50% at 20% 20%, rgba(59,130,246,0.08) 0%, transparent 60%),
                radial-gradient(ellipse 60% 60% at 80% 80%, rgba(139,92,246,0.07) 0%, transparent 60%);
            pointer-events: none;
            z-index: 0;
        }

        .container {
            position: relative;
            z-index: 1;
            width: 100%;
            max-width: 520px;
        }

        /* --- BAŞLIK --- */
        header { text-align: center; margin-bottom: 2.5rem; }
        .badge {
            display: inline-flex;
            align-items: center;
            gap: 0.4rem;
            background: rgba(59,130,246,0.12);
            border: 1px solid rgba(59,130,246,0.3);
            color: #93c5fd;
            font-size: 0.75rem;
            font-weight: 500;
            padding: 0.35rem 0.8rem;
            border-radius: 999px;
            margin-bottom: 1rem;
            letter-spacing: 0.05em;
        }
        h1 {
            font-size: 2rem;
            font-weight: 700;
            background: linear-gradient(135deg, #f1f5f9 0%, #94a3b8 100%);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
            line-height: 1.2;
            margin-bottom: 0.75rem;
        }
        header p {
            color: var(--muted);
            font-size: 0.925rem;
            line-height: 1.6;
        }

        /* --- KART --- */
        .card {
            background: var(--surface);
            border: 1px solid var(--border);
            border-radius: 20px;
            padding: 2rem;
            box-shadow: 0 25px 50px rgba(0,0,0,0.4), 0 0 0 1px rgba(255,255,255,0.03) inset;
        }

        /* --- YÜKLEME ALANI --- */
        .upload-area {
            border: 2px dashed rgba(99,179,237,0.25);
            border-radius: 14px;
            padding: 3rem 2rem;
            text-align: center;
            cursor: pointer;
            transition: all 0.25s ease;
            background: rgba(255,255,255,0.01);
            position: relative;
            overflow: hidden;
        }
        .upload-area:hover, .upload-area.dragover {
            border-color: var(--accent);
            background: rgba(59,130,246,0.06);
            transform: translateY(-1px);
        }
        .upload-icon {
            width: 56px; height: 56px;
            margin: 0 auto 1rem;
            background: linear-gradient(135deg, rgba(59,130,246,0.2), rgba(139,92,246,0.2));
            border-radius: 14px;
            display: flex; align-items: center; justify-content: center;
            font-size: 1.75rem;
        }
        .upload-area h3 { font-size: 1rem; font-weight: 500; margin-bottom: 0.4rem; }
        .upload-area p { font-size: 0.825rem; color: var(--muted); }
        .upload-area span { color: var(--accent); text-decoration: underline; cursor: pointer; }

        #fileInput { display: none; }

        /* --- ÖNİZLEME --- */
        #preview-section {
            display: none;
            margin-top: 1.5rem;
            animation: fadeIn 0.3s ease;
        }
        .preview-label { font-size: 0.8rem; color: var(--muted); font-weight: 500; margin-bottom: 0.6rem; text-transform: uppercase; letter-spacing: 0.06em; }
        #preview-img {
            width: 100%;
            border-radius: 10px;
            border: 1px solid var(--border);
            object-fit: contain;
            max-height: 140px;
            background: #0d1526;
        }
        #filename-tag {
            display: inline-block;
            margin-top: 0.5rem;
            font-size: 0.78rem;
            color: var(--muted);
            background: var(--surface2);
            padding: 0.25rem 0.65rem;
            border-radius: 6px;
        }

        /* --- BUTON --- */
        #solve-btn {
            margin-top: 1.5rem;
            width: 100%;
            padding: 1rem;
            background: linear-gradient(135deg, var(--accent), var(--accent2));
            color: white;
            font-family: 'Inter', sans-serif;
            font-size: 1rem;
            font-weight: 600;
            border: none;
            border-radius: 12px;
            cursor: pointer;
            transition: all 0.2s ease;
            letter-spacing: 0.02em;
            position: relative;
            overflow: hidden;
        }
        #solve-btn:hover:not(:disabled) {
            transform: translateY(-2px);
            box-shadow: 0 8px 25px rgba(59,130,246,0.35);
        }
        #solve-btn:active:not(:disabled) { transform: translateY(0); }
        #solve-btn:disabled { opacity: 0.6; cursor: not-allowed; }

        /* --- SONUÇ KUTUSU --- */
        #result-box {
            display: none;
            margin-top: 1.5rem;
            padding: 1.5rem;
            border-radius: 14px;
            animation: slideIn 0.35s cubic-bezier(0.16,1,0.3,1);
        }
        #result-box.success {
            background: rgba(16, 185, 129, 0.08);
            border: 1px solid rgba(16,185,129,0.25);
        }
        #result-box.error {
            background: rgba(239,68,68,0.08);
            border: 1px solid rgba(239,68,68,0.25);
        }
        .result-label { font-size: 0.78rem; color: var(--muted); font-weight: 500; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 0.5rem; }
        #result-text {
            font-size: 2.8rem;
            font-weight: 700;
            letter-spacing: 0.3em;
            color: var(--success);
            line-height: 1;
        }
        #result-box.error #result-text { font-size: 0.95rem; letter-spacing: normal; color: var(--error); }
        .result-sub { font-size: 0.8rem; color: var(--muted); margin-top: 0.5rem; }

        /* --- YÜKLEME SPINNER --- */
        .spinner {
            display: inline-block;
            width: 18px; height: 18px;
            border: 2px solid rgba(255,255,255,0.3);
            border-top-color: white;
            border-radius: 50%;
            animation: spin 0.7s linear infinite;
            vertical-align: middle;
            margin-right: 8px;
        }

        /* --- FOOTER --- */
        footer { text-align: center; margin-top: 2rem; color: var(--muted); font-size: 0.8rem; }
        footer a { color: var(--accent); text-decoration: none; }
        footer a:hover { text-decoration: underline; }

        /* --- ANİMASYONLAR --- */
        @keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
        @keyframes slideIn {
            from { opacity: 0; transform: translateY(12px); }
            to { opacity: 1; transform: translateY(0); }
        }
        @keyframes spin { to { transform: rotate(360deg); } }
