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

:root {
    --primary: #6b7280;
    --secondary: #9ca3af;
    --accent: #e5e7eb;
    --bg-light: #f9fafb;
    --bg-white: #ffffff;
    --border: #e5e7eb;
    --text-primary: #111827;
    --text-secondary: #6b7280;
}

html, body {
    width: 100%;
    height: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', sans-serif;
    background: var(--bg-light);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.container {
    width: 100%;
    max-width: 900px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Header */
.header {
    text-align: center;
}

.title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.subtitle {
    font-size: 1rem;
    color: var(--text-secondary);
    font-weight: 400;
}

/* Canvas Wrapper */
.canvas-wrapper {
    width: 100%;
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

canvas {
    display: block;
    width: 100%;
    height: auto;
    background: var(--bg-white);
}

/* Controls */
.controls {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}

.btn {
    padding: 12px 24px;
    border: 1px solid var(--border);
    background: var(--bg-white);
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    color: var(--text-primary);
    transition: all 0.2s ease;
}

.btn:hover {
    border-color: var(--primary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transform: translateY(-1px);
}

.btn:active {
    transform: translateY(0);
}

/* Info Panel */
.info-panel {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 16px;
}

.info-item {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 16px;
    text-align: center;
    transition: all 0.2s ease;
}

.info-item:hover {
    border-color: var(--primary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.info-label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
    font-weight: 600;
}

.info-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

/* Instructions */
.instructions {
    text-align: center;
    padding: 16px;
    background: var(--accent);
    border-radius: 8px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.instructions p {
    margin: 0;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        gap: 16px;
    }

    .title {
        font-size: 2rem;
    }

    .controls {
        gap: 10px;
    }

    .btn {
        padding: 10px 16px;
        font-size: 0.85rem;
    }

    .info-item {
        padding: 12px;
    }

    .info-value {
        font-size: 1.25rem;
    }
}

@media (max-width: 480px) {
    .title {
        font-size: 1.5rem;
    }

    .subtitle {
        font-size: 0.9rem;
    }

    .controls {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

    .info-item {
        padding: 12px;
    }

    .info-label {
        font-size: 0.75rem;
    }

    .info-value {
        font-size: 1.25rem;
    }
}
