:root {
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --secondary-color: #64748b;
    --success-color: #10b981;
    --error-color: #ef4444;
    --bg-color: #f8fafc;
    --card-bg: #ffffff;
    --text-color: #1e293b;
    --text-light: #64748b;
    --border-color: #e2e8f0;
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* Screen Management */
.screen {
    display: none;
    min-height: 100vh;
}

.screen.active {
    display: block;
}

/* Start Screen */
#start-screen {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 2rem;
}

#start-screen h1 {
    font-size: 3rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.subtitle {
    text-align: center;
    color: var(--text-light);
    font-size: 1.125rem;
    margin-bottom: 3rem;
}

.start-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 800px;
    margin: 0 auto;
}

.option-card {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
}

.option-card h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.option-card p {
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

.token-input-group {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.token-input-group input {
    flex: 1;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    font-family: monospace;
    text-transform: uppercase;
}

.token-input-group input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.error-message {
    color: var(--error-color);
    font-size: 0.875rem;
    margin-top: 0.5rem;
    display: none;
}

.error-message.show {
    display: block;
}

/* Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
    width: 100%;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: white;
}

.btn-secondary:hover {
    background-color: #475569;
}

.btn-outline {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-outline:hover {
    background-color: var(--primary-color);
    color: white;
}

/* Main Screen */
#main-screen {
    padding-bottom: 2rem;
}

.header {
    background: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow);
}

.header-info h2 {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
}

.token-display {
    font-size: 0.875rem;
    color: var(--text-light);
}

.token-display strong {
    color: var(--text-color);
    font-family: monospace;
    font-size: 1rem;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.save-status {
    font-size: 0.875rem;
    color: var(--text-light);
}

.save-status.saving {
    color: var(--secondary-color);
}

.save-status.saved {
    color: var(--success-color);
}

.save-status.error {
    color: var(--error-color);
}

.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* Sections */
.section {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
    border: 1px solid var(--border-color);
}

.section h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.section-description {
    color: var(--text-light);
    margin-bottom: 1.5rem;
    font-size: 0.9375rem;
}

/* Rollen List */
.rollen-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.rol-item {
    background: var(--bg-color);
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr auto;
    gap: 1rem;
    align-items: center;
}

.rol-item input[type="text"] {
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.9375rem;
}

.rol-item input[type="text"]:focus {
    outline: none;
    border-color: var(--primary-color);
}

.slider-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.slider-group label {
    font-size: 0.75rem;
    color: var(--text-light);
    font-weight: 500;
}

.slider-group label.warning {
    color: var(--error-color);
    font-weight: 600;
}

.slider-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.slider {
    flex: 1;
    height: 6px;
    border-radius: 3px;
    background: var(--border-color);
    outline: none;
    -webkit-appearance: none;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
}

.slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    border: none;
}

.slider-value {
    min-width: 40px;
    text-align: right;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-color);
}

.btn-remove {
    background: var(--error-color);
    color: white;
    border: none;
    border-radius: 6px;
    width: 36px;
    height: 36px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    transition: background 0.2s;
}

.btn-remove:hover {
    background: #dc2626;
}

.actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.rol-count {
    color: var(--text-light);
    font-size: 0.875rem;
}

/* Tijd Warning */
.tijd-warning {
    background: #fef3c7;
    border: 2px solid #f59e0b;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    color: #92400e;
    font-weight: 500;
    display: none;
}

.tijd-warning.show {
    display: block;
}

/* Rol Style Controls */
.rol-style-controls {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.color-picker-group,
.fill-style-group {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.color-picker-group label,
.fill-style-group label {
    font-size: 0.75rem;
    color: var(--text-light);
    font-weight: 500;
}

.rol-color-picker {
    width: 100%;
    height: 36px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    cursor: pointer;
    padding: 2px;
}

.rol-fill-style {
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.875rem;
    font-family: inherit;
    background: white;
    cursor: pointer;
}

.rol-fill-style:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* Wheel Visualization */
.wheel-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    background: var(--bg-color);
    border-radius: 8px;
    min-height: 400px;
}

#wheel-canvas {
    max-width: 100%;
    height: auto;
}

/* Reflection Form */
.reflection-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-weight: 500;
    color: var(--text-color);
    font-size: 0.9375rem;
}

.form-group textarea {
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.9375rem;
    font-family: inherit;
    resize: vertical;
    min-height: 80px;
}

.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* Print Styles */
@media print {
    body {
        background: white;
    }
    
    .header {
        display: none;
    }
    
    /* Hide first section (Rollen Editor) completely */
    .section:first-of-type {
        display: none !important;
    }
    
    /* Hide all buttons and actions */
    .btn {
        display: none !important;
    }
    
    .actions {
        display: none !important;
    }
    
    /* Hide rol count */
    .rol-count {
        display: none !important;
    }
    
    /* Show only wheel and reflection sections */
    .section {
        page-break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ccc;
        margin-bottom: 2rem;
    }
    
    /* Ensure wheel section (2nd section) is visible */
    .section:nth-of-type(2) {
        display: block !important;
    }
    
    /* Ensure reflection section (3rd section) is visible */
    .section:nth-of-type(3) {
        display: block !important;
    }
    
    .wheel-container {
        page-break-inside: avoid;
    }
    
    #wheel-canvas {
        max-width: 100%;
    }
    
    /* Ensure reflection form is visible */
    .reflection-form {
        display: flex !important;
    }
    
    /* Hide empty state messages */
    .empty-state {
        display: none !important;
    }
    
    /* Hide rollen list in editor section */
    .rollen-list {
        display: none;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .header-actions {
        width: 100%;
        justify-content: space-between;
    }
    
    .rol-item {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .rol-style-controls {
        grid-column: 1 / -1;
    }
    
    .wheel-container {
        padding: 1rem;
    }
    
    #wheel-canvas {
        width: 100%;
        height: auto;
    }
    
    .start-options {
        grid-template-columns: 1fr;
    }
}

