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

:root {
    --bg: #0e1117;
    --panel: #171c24;
    --panel-alt: #1e2430;
    --border: rgba(255, 255, 255, 0.08);
    --primary: #56b4d3;
    --primary-dark: #3994b1;
    --text: #f4f5f7;
    --muted: #a5b4c3;
    --accent: #4ade80;
}

body {
    font-family: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
}

/* Scrollbar styling */
body::-webkit-scrollbar {
    width: 10px;
}
body::-webkit-scrollbar-track {
    background: #0a0d13;
    border-radius: 999px;
}
body::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(86, 180, 211, 0.6) 0%, rgba(57, 148, 177, 0.6) 100%);
    border-radius: 999px;
}
body::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, rgba(123, 208, 231, 0.7) 0%, rgba(82, 160, 187, 0.7) 100%);
}

.hero {
    padding: 40px 6vw 20px;
    border-bottom: 1px solid var(--border);
}

.hero-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    align-items: center;
    gap: 32px;
}

.hero h1 {
    font-size: clamp(2.2rem, 4vw, 3rem);
    margin-bottom: 8px;
}

.eyebrow {
    letter-spacing: 0.2em;
    text-transform: uppercase;
    font-size: 0.75rem;
    color: var(--muted);
    margin-bottom: 12px;
}

.lead {
    max-width: 720px;
    color: var(--muted);
    line-height: 1.6;
}

.hero-highlights {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

.hero-highlights div {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 16px;
}
.usage-card p {
    margin: 6px 0;
    line-height: 1.6;
    text-align: justify;
    padding-left: 10px;
    padding-right: 10px;
    
    padding-bottom: 5px;

}

.hero-highlights .stat {
    display: block;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 6px;
    padding-left: 10px;
    padding-right: 10px;
   
}

.page {
    padding: 32px 6vw 60px;
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.workspace {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
    gap: 24px;
}

.canvas-panel,
.insights-panel {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    align-items: flex-start;
}

.panel-header h2,
.panel-header h3 {
    font-size: 1.1rem;
    margin-bottom: 4px;
}

.panel-header p {
    color: var(--muted);
    font-size: 0.95rem;
}

.panel-header.compact {
    align-items: center;
}

.canvas-wrapper {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border);
    width: min(420px, 100%);
    margin: 0 auto;
}

#drawingCanvas {
    display: block;
    width: 100%;
    max-width: 420px;
    height: auto;
    background: #fff;
    cursor: crosshair;
}

.canvas-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(0, 0, 0, 0.5);
    font-weight: 500;
    pointer-events: none;
    background: rgba(255, 255, 255, 0.05);
}

.canvas-overlay.hidden {
    opacity: 0;
}

.tool-buttons {
    display: flex;
    gap: 8px;
}

.tool-btn {
    border: 1px solid var(--border);
    background: transparent;
    color: var(--muted);
    padding: 8px 16px;
    border-radius: 999px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tool-btn.active {
    background: var(--primary);
    border-color: transparent;
    color: #08131c;
}

.actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.action {
    border-radius: 10px;
    border: none;
    padding: 10px 18px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
}

.action.secondary {
    background: var(--panel-alt);
    color: var(--muted);
}

.action.primary {
    background: var(--primary);
    color: #08131c;
}

.insights-panel {
    gap: 22px;
}

.panel-section {
    background: var(--panel-alt);
    border-radius: 14px;
    padding: 18px;
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.result-card.hidden {
    display: none;
}

.result-card {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.prediction {
    display: flex;
    align-items: baseline;
    gap: 16px;
}

.prediction-value {
    font-size: 3.5rem;
    font-weight: 600;
    color: var(--accent);
}

.prediction-label {
    color: var(--muted);
}

.confidence-block {
    padding: 14px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 12px;
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.confidence-info {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: var(--muted);
}

.confidence-info strong {
    color: var(--text);
    font-size: 1.1rem;
}

.confidence-bar {
    width: 100%;
    height: 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    overflow: hidden;
}

.confidence-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--primary) 0%, var(--accent) 100%);
    transition: width 0.5s ease;
}

.probabilities h4 {
    margin-bottom: 8px;
}

.probabilities-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.probabilities-list li {
    display: flex;
    justify-content: space-between;
    padding: 8px 12px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.04);
    font-weight: 500;
}

.probabilities-list li .value {
    color: var(--primary);
}

.preview-section canvas {
    width: min(220px, 100%);
    border-radius: 12px;
    border: 1px solid var(--border);
    background: #fff;
    image-rendering: pixelated;
    margin: 0 auto;
    display: block;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
}

.info-card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    color: var(--muted);
}

.info-card h4 {
    color: var(--text);
}

.info-card ul {
    list-style: disc inside;
    line-height: 1.6;
}

.info-card ol {
    padding-left: 18px;
    line-height: 1.6;
}

.site-footer {
    padding: 20px 6vw 40px;
    border-top: 1px solid var(--border);
    text-align: center;
    color: var(--muted);
    font-size: 0.9rem;
}

@media (max-width: 960px) {
    .workspace {
        grid-template-columns: 1fr;
    }

    .actions {
        justify-content: center;
    }
}

@media (max-width: 600px) {
    .hero-content {
        text-align: left;
    }

    .tool-buttons {
        width: 100%;
    }

    .tool-btn {
        flex: 1;
        text-align: center;
    }

    .actions {
        flex-direction: column;
    }

    .action {
        width: 100%;
    }
}
