/* ===== DESIGN TOKENS ===== */
:root {
    /* Primary palette - nature green */
    --primary: #66BB6A;
    --primary-light: #E8F5E9;
    --primary-mid: #A5D6A7;
    --primary-dark: #1B5E20;

    /* Neutral palette */
    --bg: #f6f9f6;
    --bg-card: #ffffff;
    --text: #1B2E1B;
    --text-secondary: #4a6a4a;
    --text-muted: #8aaa8a;
    --border: #d4e8d4;
    --border-light: #eaf3ea;

    /* Accents */
    --success: #43A047;
    --success-light: #E8F5E9;
    --warning: #f59e0b;
    --warning-light: #fef3c7;
    --danger: #ef4444;
    --danger-light: #fee2e2;

    /* Surfaces */
    --surface-dark: #1B5E20;
    --surface-overlay: rgba(27, 94, 32, 0.45);

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(27, 94, 32, 0.06);
    --shadow-md: 0 4px 12px rgba(27, 94, 32, 0.08);
    --shadow-lg: 0 8px 24px rgba(27, 94, 32, 0.12);
    --shadow-xl: 0 16px 40px rgba(27, 94, 32, 0.15);

    /* Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-full: 9999px;

    /* Fonts */
    --font: 'Space Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
}

/* ===== RESET ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; }
body {
    font-family: var(--font);
    background-color: var(--bg);
    color: var(--text);
    min-height: 100vh;
    min-height: 100dvh;
    overflow-x: hidden;
    line-height: 1.5;
}

/* ===== LAYOUT ===== */
.app-wrapper { position: relative; min-height: 100vh; }
.app-container {
    max-width: 480px;
    margin: 0 auto;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 16px;
    padding-bottom: 130px;
}

/* ===== CARDS ===== */
.brutal-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.card-header {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 0.8rem;
    letter-spacing: 0.3px;
    color: var(--text-secondary);
}
.card-header.bg-cyan { background: var(--primary-light); color: var(--primary); }
.card-header.bg-teal { background: var(--surface-dark); color: white; }

.card-header .dot {
    width: 10px; height: 10px;
    border-radius: 50%;
    opacity: 0.7;
}
.card-header .dot:nth-child(1) { background: var(--danger); }
.card-header .dot:nth-child(2) { background: var(--warning); }
.card-header .dot:nth-child(3) { background: var(--success); }

/* ===== HEADER ===== */
.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding: 4px 0;
}
.header-left { display: flex; align-items: center; gap: 10px; }
.logo-icon {
    font-size: 1.6rem;
    color: var(--primary);
    display: flex;
    align-items: center;
}
.logo-title {
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.status-badge {
    display: flex; align-items: center; gap: 6px;
    padding: 6px 12px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    font-family: var(--font-mono);
    font-weight: 600;
    font-size: 0.75rem;
    color: var(--text-secondary);
    box-shadow: var(--shadow-sm);
}
.status-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--text-muted);
    transition: background 0.3s ease;
}
.status-dot.active { background: var(--success); box-shadow: 0 0 6px rgba(34, 197, 94, 0.4); }
.status-dot.analyzing { background: var(--warning); box-shadow: 0 0 6px rgba(245, 158, 11, 0.4); animation: pulseGlow 1.5s infinite; }

@keyframes pulseGlow {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* ===== MAIN BODY ===== */
.main-body {
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.camera-column {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* ===== CAMERA VIEW ===== */
.camera-card {
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.camera-viewport {
    position: relative;
    width: 100%;
    aspect-ratio: 3/4;
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    overflow: hidden;
}
.camera-viewport video {
    width: 100%; height: 100%;
    object-fit: cover;
    transform: scaleX(-1);
}
.overlay-canvas {
    position: absolute; inset: 0; pointer-events: none;
}

.face-guide {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 55%; height: 70%;
    z-index: 2; pointer-events: none;
    opacity: 0.5;
}
.face-guide svg {
    width: 100%; height: 100%;
}
.face-guide svg ellipse {
    stroke: rgba(255,255,255,0.5);
    stroke-width: 2;
}

/* Scan overlay */
.scan-overlay { position: absolute; inset: 0; z-index: 3; pointer-events: none; display: none; }
.scan-overlay.active { display: block; }
.scan-beam {
    position: absolute; left: 0; width: 100%; height: 3px;
    background: linear-gradient(90deg, transparent 0%, var(--primary) 30%, var(--primary) 70%, transparent 100%);
    box-shadow: 0 0 12px rgba(102, 187, 106, 0.5), 0 0 24px rgba(102, 187, 106, 0.25);
    animation: smoothScan 2.5s ease-in-out infinite;
}
@keyframes smoothScan {
    0% { top: 0%; opacity: 0; }
    10% { opacity: 1; }
    50% { top: 100%; }
    60% { opacity: 1; }
    70% { top: 0%; opacity: 0; }
    100% { top: 0%; opacity: 0; }
}

/* No camera state */
.no-camera {
    position: absolute; inset: 0;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
}
.no-camera.hidden { display: none; }
.no-camera-icon {
    font-size: 2.5rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
}
.no-camera p {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* ===== BUTTONS (GENERAL) ===== */
.brutal-btn {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    font-family: var(--font);
    font-weight: 600;
    transition: all 0.2s ease;
    color: var(--text);
    display: flex;
    align-items: center;
    justify-content: center;
}
.brutal-btn:hover:not(:disabled) {
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}
.brutal-btn:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: var(--shadow-sm);
}
.brutal-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background: var(--border-light);
}

.brutal-badge {
    background: var(--primary-light);
    border: none;
    border-radius: var(--radius-sm);
    padding: 4px 10px;
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 0.75rem;
    color: var(--primary);
}

/* ===== ACTION BAR ===== */
.action-bar-wrapper {
    position: fixed; bottom: 20px;
    left: 50%; transform: translateX(-50%);
    width: 100%; max-width: 480px;
    padding: 0 16px;
    z-index: 50;
}
.action-bar {
    display: flex; align-items: center; justify-content: center; gap: 12px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(226, 232, 240, 0.8);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
}

.btn-square {
    width: 48px; height: 48px;
    font-size: 1.2rem;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    position: relative;
}
.btn-square:hover:not(:disabled) {
    background: var(--primary-light);
    color: var(--primary);
}

.btn-action:not(:disabled) {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}
.btn-action:not(:disabled):hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
}

/* Button labels */
.btn-square::after {
    content: attr(title);
    position: absolute;
    bottom: -16px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.55rem;
    font-weight: 600;
    color: var(--text-muted);
    white-space: nowrap;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

/* Loading state */
.brutal-btn.loading {
    background: var(--primary) !important;
    color: white !important;
    border-color: var(--primary) !important;
    animation: gentlePulse 1s infinite alternate;
    pointer-events: none;
}
@keyframes gentlePulse {
    0% { opacity: 1; }
    100% { opacity: 0.7; }
}

/* Camera button */
.btn-camera {
    width: 64px; height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    border: 3px solid white;
    box-shadow: 0 4px 16px rgba(102, 187, 106, 0.35);
}
.btn-camera::after {
    content: 'Kamera';
    position: absolute;
    bottom: -16px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.55rem;
    font-weight: 600;
    color: var(--text-muted);
    white-space: nowrap;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}
.btn-camera:hover {
    box-shadow: 0 6px 20px rgba(102, 187, 106, 0.5);
    transform: translateY(-2px);
}
.btn-camera.recording {
    background: linear-gradient(135deg, var(--danger) 0%, #dc2626 100%);
    box-shadow: 0 4px 16px rgba(239, 68, 68, 0.4);
    animation: recordPulse 2s infinite;
}
@keyframes recordPulse {
    0%, 100% { box-shadow: 0 4px 16px rgba(239, 68, 68, 0.35); }
    50% { box-shadow: 0 4px 24px rgba(239, 68, 68, 0.6); }
}

.camera-btn-inner {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ===== AUTO ANALYZE BAR ===== */
.auto-bar {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.auto-toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.auto-label {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text);
}

.toggle-switch { position: relative; width: 48px; height: 26px; display: inline-block; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
    position: absolute; cursor: pointer; inset: 0;
    background: var(--border);
    border: none;
    border-radius: var(--radius-full);
    transition: 0.3s ease;
}
.toggle-slider::before {
    content: ''; position: absolute;
    height: 20px; width: 20px; left: 3px; bottom: 3px;
    background: white;
    border-radius: 50%;
    transition: 0.3s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}
.toggle-switch input:checked + .toggle-slider { background: var(--primary); }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(22px); }

.interval-row { display: flex; align-items: center; gap: 10px; }
.interval-label { font-family: var(--font-mono); font-weight: 600; font-size: 0.8rem; color: var(--text-secondary); }
.brutal-slider {
    flex: 1; -webkit-appearance: none; appearance: none;
    height: 6px; background: var(--border);
    border: none; border-radius: 3px; outline: none;
}
.brutal-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px; height: 18px;
    background: var(--primary);
    border: 2px solid white;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(102, 187, 106, 0.3);
}

/* ===== RESULTS SECTION ===== */
.results-placeholder {
    padding: 40px 24px;
    text-align: center;
    background: var(--bg);
}
.placeholder-emoji {
    font-size: 3rem;
    color: var(--text-muted);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.results-placeholder p {
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.results-list { padding: 16px; }
.results-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}
.results-header h2 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
}
.scan-counter {
    background: var(--primary-light);
    color: var(--primary);
}

/* ===== ETHNICITY ITEMS ===== */
.ethnicity-items { display: flex; flex-direction: column; gap: 10px; }

.eth-item {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--bg-card);
    transition: all 0.2s ease;
}
.eth-item:hover {
    border-color: var(--primary);
    box-shadow: 0 2px 8px rgba(102, 187, 106, 0.1);
}

.eth-item-dominant {
    background: linear-gradient(135deg, var(--primary-light), #f0faf0);
    border-color: var(--primary);
    box-shadow: 0 2px 12px rgba(102, 187, 106, 0.15);
}

.eth-flag { font-size: 1.8rem; flex-shrink: 0; }

.eth-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.eth-name { font-weight: 700; font-size: 0.9rem; color: var(--text); }

.eth-bar-track {
    width: 100%; height: 8px;
    background: var(--border-light);
    border: none;
    border-radius: 4px;
    overflow: hidden;
}
.eth-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--primary-dark));
    border: none;
    border-radius: 4px;
    transition: width 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.eth-item-dominant .eth-bar-fill {
    background: linear-gradient(90deg, var(--primary), #2E7D32);
}

.eth-percentage {
    font-family: var(--font-mono);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary);
    min-width: 50px;
    text-align: right;
}

.confidence-row {
    display: flex; align-items: center; justify-content: space-between;
    margin-top: 16px; padding-top: 14px;
    border-top: 1px solid var(--border);
}
.confidence-label { font-weight: 600; font-size: 0.85rem; color: var(--text-secondary); }
.confidence-value.high { background: var(--success-light); color: #16a34a; }
.confidence-value.medium { background: var(--warning-light); color: #d97706; }
.confidence-value.low { background: var(--danger-light); color: #dc2626; }

/* ===== HISTORY MODAL ===== */
.history-modal {
    position: fixed; inset: 0; z-index: 100;
    display: flex; align-items: flex-end; justify-content: center;
    padding: 16px;
    opacity: 0; pointer-events: none; transition: opacity 0.25s ease;
    background: var(--surface-overlay);
    backdrop-filter: blur(4px);
}
.history-modal.open { opacity: 1; pointer-events: all; }

.history-panel {
    width: 100%; max-width: 480px; max-height: 70vh;
    display: flex; flex-direction: column;
    transform: translateY(110%);
    transition: transform 0.35s cubic-bezier(0.33, 1, 0.68, 1);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.history-modal.open .history-panel { transform: translateY(0); }

.history-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.history-header h3 {
    font-size: 0.85rem;
}

/* Error modal */
.error-modal {
    position: fixed; inset: 0; z-index: 150;
    display: flex; align-items: center; justify-content: center;
    padding: 16px;
    opacity: 0; pointer-events: none; transition: opacity 0.25s ease;
    background: var(--surface-overlay);
    backdrop-filter: blur(4px);
}
.error-modal.open { opacity: 1; pointer-events: all; }

.error-panel {
    width: 100%; max-width: 340px;
    display: flex; flex-direction: column;
    transform: scale(0.95); opacity: 0;
    transition: all 0.3s cubic-bezier(0.33, 1, 0.68, 1);
}
.error-modal.open .error-panel { transform: scale(1); opacity: 1; }

.error-body {
    padding: 32px 24px;
    text-align: center;
    background: var(--bg-card);
}
.error-icon {
    font-size: 3rem;
    color: var(--danger);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.error-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 8px;
}
.error-desc {
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.btn-small {
    padding: 6px 10px;
    font-size: 0.9rem;
    border-radius: var(--radius-sm);
}
.btn-full {
    width: 100%;
    padding: 14px;
    font-size: 0.9rem;
    border-radius: var(--radius-md);
}
.btn-red {
    background: var(--danger);
    color: white;
    border-color: var(--danger);
}
.btn-red:hover {
    background: #dc2626;
    border-color: #dc2626;
}

.history-body {
    flex: 1; overflow-y: auto;
    padding: 16px;
    display: flex; flex-direction: column; gap: 10px;
    background: var(--bg);
}
.history-body::-webkit-scrollbar { width: 6px; }
.history-body::-webkit-scrollbar-track { background: transparent; }
.history-body::-webkit-scrollbar-thumb { background: var(--text-muted); border-radius: 3px; }

.history-empty {
    text-align: center;
    padding: 40px 20px;
    font-weight: 500;
    color: var(--text-secondary);
}
.history-footer {
    padding: 16px;
    background: var(--bg-card);
    border-top: 1px solid var(--border);
}

.history-entry {
    display: flex; align-items: center; gap: 12px;
    padding: 12px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    transition: border-color 0.2s;
}
.history-entry:hover { border-color: var(--primary); }
.history-entry-flag { font-size: 1.6rem; }
.history-entry-info { flex: 1; min-width: 0; }
.history-entry-name { font-weight: 700; font-size: 0.9rem; color: var(--text); }
.history-entry-sub { font-family: var(--font-mono); font-size: 0.7rem; margin-top: 2px; color: var(--text-secondary); }
.history-entry-right { text-align: right; }
.history-entry-pct { font-family: var(--font-mono); font-size: 1rem; font-weight: 700; color: var(--primary); display: block; }
.history-entry-time { font-family: var(--font-mono); font-size: 0.65rem; color: var(--text-muted); }

/* ===== TOAST ===== */
.toast-container {
    position: fixed; top: 16px; left: 50%; transform: translateX(-50%);
    z-index: 200; display: flex; flex-direction: column; gap: 8px;
    width: 90%; max-width: 380px;
}
.toast {
    padding: 12px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    font-weight: 600; font-size: 0.85rem;
    display: flex; align-items: center; gap: 10px;
    animation: toastSlideIn 0.3s ease-out;
    color: var(--text);
}
.toast.error { background: var(--danger); color: white; border-color: var(--danger); }
.toast.success { background: var(--success); color: white; border-color: var(--success); }
.toast-icon { font-size: 1rem; }

@keyframes toastSlideIn {
    from { transform: translateY(-20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}
@keyframes toastOut {
    to { transform: translateY(-20px); opacity: 0; }
}

/* ===== TUTORIAL MODAL ===== */
.tutorial-modal {
    position: fixed; inset: 0; z-index: 120;
    display: flex; align-items: center; justify-content: center;
    padding: 16px;
    opacity: 0; pointer-events: none; transition: opacity 0.3s ease;
    background: var(--surface-overlay);
    backdrop-filter: blur(6px);
}
.tutorial-modal.open { opacity: 1; pointer-events: all; }

.tutorial-panel {
    width: 100%; max-width: 460px; max-height: 85vh;
    display: flex; flex-direction: column;
    transform: translateY(30px) scale(0.96); opacity: 0;
    transition: all 0.4s cubic-bezier(0.33, 1, 0.68, 1);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
}
.tutorial-modal.open .tutorial-panel {
    transform: translateY(0) scale(1); opacity: 1;
}

.tutorial-body {
    flex: 1; overflow-y: auto;
    padding: 24px 20px;
    display: flex; flex-direction: column; gap: 24px;
    background: var(--bg);
}
.tutorial-body::-webkit-scrollbar { width: 5px; }
.tutorial-body::-webkit-scrollbar-track { background: transparent; }
.tutorial-body::-webkit-scrollbar-thumb { background: var(--text-muted); border-radius: 3px; }

.tutorial-welcome {
    text-align: center;
    padding: 8px 0 4px;
}
.tutorial-welcome-icon {
    font-size: 2.8rem;
    color: var(--primary);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: tutorialIconFloat 3s ease-in-out infinite;
}
@keyframes tutorialIconFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}
.tutorial-welcome h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 6px;
    letter-spacing: -0.3px;
}
.tutorial-welcome p {
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--text-secondary);
    line-height: 1.6;
}

.tutorial-steps {
    display: flex; flex-direction: column; gap: 4px;
}
.tutorial-step {
    display: flex; align-items: flex-start; gap: 14px;
    padding: 14px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    transition: all 0.25s ease;
}
.tutorial-step:hover {
    border-color: var(--primary);
    box-shadow: 0 2px 12px rgba(102, 187, 106, 0.1);
    transform: translateX(4px);
}
.tutorial-step-number {
    width: 30px; height: 30px;
    min-width: 30px;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 0.8rem;
    border-radius: 50%;
    margin-top: 2px;
}
.tutorial-step-content h4 {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 4px;
}
.tutorial-step-content p {
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text-secondary);
    line-height: 1.55;
}
.tutorial-step-content strong {
    color: var(--primary);
    font-weight: 700;
}

.tutorial-tips {
    background: var(--primary-light);
    border: 1px solid rgba(102, 187, 106, 0.2);
    border-radius: var(--radius-md);
    padding: 16px;
}
.tutorial-tip-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    color: var(--primary);
    font-size: 0.88rem;
}
.tutorial-tips ul {
    list-style: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.tutorial-tips li {
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text-secondary);
    padding-left: 18px;
    position: relative;
    line-height: 1.5;
}
.tutorial-tips li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--primary);
    font-weight: 700;
    font-size: 0.75rem;
}

.tutorial-footer {
    padding: 16px 20px;
    background: var(--bg-card);
    border-top: 1px solid var(--border);
}
.tutorial-footer .brutal-btn {
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.2px;
    box-shadow: 0 4px 16px rgba(102, 187, 106, 0.3);
    transition: all 0.25s ease;
}
.tutorial-footer .brutal-btn:hover {
    box-shadow: 0 6px 24px rgba(102, 187, 106, 0.45);
    transform: translateY(-1px);
}

/* ===== CROPPER OVERRIDES ===== */
.cropper-view-box,
.cropper-face {
    border-radius: 4px;
}
.cropper-line, .cropper-point {
    background-color: var(--primary) !important;
}
.cropper-view-box {
    outline: 2px solid var(--primary) !important;
    outline-color: var(--primary) !important;
}

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

/* Tablet */
@media (min-width: 768px) {
    .app-container {
        max-width: 720px;
        padding: 28px;
    }
    .header { margin-bottom: 28px; }
    .logo-title { font-size: 1.5rem; }

    .main-body {
        flex-direction: row;
        gap: 24px;
        align-items: flex-start;
    }

    .camera-column {
        flex: 1;
        max-width: 360px;
        position: sticky;
        top: 28px;
    }

    .results-section { flex: 1; min-width: 0; }

    .action-bar-wrapper { max-width: 720px; bottom: 24px; }
}

/* Desktop */
@media (min-width: 1024px) {
    .app-container {
        max-width: 1100px;
        padding: 40px 48px;
        padding-bottom: 140px;
    }
    .header { margin-bottom: 36px; }
    .logo-icon { font-size: 1.8rem; }
    .logo-title { font-size: 1.7rem; }

    .main-body {
        flex-direction: row;
        gap: 36px;
        align-items: flex-start;
    }

    .camera-column {
        flex: 0 0 460px;
        max-width: 460px;
        position: sticky;
        top: 40px;
    }

    .results-section {
        flex: 1;
        min-width: 0;
    }

    .action-bar-wrapper {
        max-width: 1100px;
        bottom: 28px;
    }

    .action-bar {
        padding: 14px 24px;
        gap: 16px;
    }

    .btn-square {
        width: 52px;
        height: 52px;
    }

    .btn-camera {
        width: 68px;
        height: 68px;
    }

    .camera-viewport {
        border-radius: 0 0 var(--radius-md) var(--radius-md);
    }

    .eth-item {
        padding: 14px 18px;
    }

    .results-list {
        padding: 20px;
    }

    .results-header h2 {
        font-size: 1.1rem;
    }
}

/* Large Desktop */
@media (min-width: 1440px) {
    .app-container {
        max-width: 1280px;
        padding: 48px 64px;
        padding-bottom: 150px;
    }

    .camera-column {
        flex: 0 0 520px;
        max-width: 520px;
    }

    .action-bar-wrapper {
        max-width: 1280px;
    }
}

@media (max-width: 380px) {
    .tutorial-step { padding: 12px; gap: 10px; }
    .tutorial-step-number { width: 26px; height: 26px; min-width: 26px; font-size: 0.7rem; }
    .tutorial-welcome h2 { font-size: 1.1rem; }
}
