:root {
    --bg-color: #0f172a;
    --card-bg: #1e293b;
    --text-color: #f8fafc;
    --accent-color: #38bdf8;
    --accent-hover: #0284c7;
    --border-color: #334155;
    --ev-color: #f59e0b;
}

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

body {
    font-family: system-ui, -apple-system, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    min-height: 100vh;
    padding: 2rem 1rem;
}

.app-container {
    max-width: 1200px;
    margin: 0 auto;
}

header {
    text-align: center;
    margin-bottom: 2rem;
}

.main-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.left-column {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

@media (min-width: 900px) {
    .main-content {
        flex-direction: row;
        align-items: flex-start;
    }
    
    .left-column {
        flex: 1;
    }
    
    .controls-section {
        width: 400px;
        flex-shrink: 0;
    }
}

.board-section {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: var(--card-bg);
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid var(--border-color);
}

.board-content {
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.play-section {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.25rem;
}

.play-section h2 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
}

#dartboard-container {
    width: 100%;
    max-width: 600px;
    aspect-ratio: 1 / 1;
    cursor: crosshair;
}

.controls-section {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.25rem;
}

.card h2 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
}

.card h3 {
    font-size: 1rem;
    margin: 1.25rem 0 0.75rem 0;
    color: var(--accent-color);
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

select {
    width: 100%;
    padding: 0.6rem;
    border-radius: 6px;
    background-color: var(--bg-color);
    color: var(--text-color);
    border: 1px solid var(--border-color);
}

input[type="range"] {
    width: 100%;
    padding: 0;
    border-radius: 6px;
    background-color: var(--bg-color);
    color: var(--text-color);
    border: 1px solid var(--border-color);
}

.info-box {
    padding: 0.75rem;
    background-color: var(--bg-color);
    border: 1px dashed var(--accent-color);
    border-radius: 6px;
    font-size: 0.9rem;
    text-align: center;
    color: var(--accent-color);
    margin-bottom: 1rem;
}

.ev-box {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background-color: rgba(245, 158, 11, 0.1);
    border: 1px solid var(--ev-color);
    border-radius: 6px;
    margin: 1rem 0;
    font-size: 1.05rem;
}

.ev-box strong {
    color: var(--ev-color);
    font-size: 1.2rem;
}

.hidden {
    display: none !important;
}

.actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.25rem;
}

.btn {
    flex: 1;
    padding: 0.75rem;
    border: none;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn.primary {
    background-color: var(--accent-color);
    color: #000;
}

.btn.primary:hover {
    background-color: var(--accent-hover);
    color: #fff;
}

.btn.secondary {
    background-color: #475569;
    color: #fff;
}

.btn.secondary:hover {
    background-color: #334155;
}

.stats-grid {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    font-size: 1rem;
}

.history-list {
    list-style: none;
    height: 180px;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 0.5rem;
    background-color: var(--bg-color);
}

.history-list li {
    padding: 0.3rem 0.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
}

.history-list li:last-child {
    border-bottom: none;
}

.project-url {
    position: absolute;
    bottom: 0.5rem;
    right: 0.5rem;
    color: var(--accent-color);
    text-decoration: none;
    font-size: 0.8rem;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.project-url:hover {
    opacity: 1;
}