/* Random Picker Tool Styles */

:root {
    --primary-color: #4f46e5;
    --secondary-color: #e11d48;
    --success-color: #059669;
    --warning-color: #d97706;
    --background-color: #f8fafc;
    --surface-color: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --border-color: #e2e8f0;
    --shadow-light: 0 1px 3px 0 rgb(0 0 0 / 0.1);
    --shadow-medium: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    --border-radius: 8px;
    --transition: all 0.3s ease;
}

[data-theme="dark"] {
    --background-color: #0f172a;
    --surface-color: #1e293b;
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --border-color: #334155;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--background-color);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

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

header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

header .icon {
    font-size: 3rem;
}

header p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.status-banner {
    margin-bottom: 1.5rem;
    padding: 0.75rem 1rem;
    border-radius: var(--border-radius);
    background: rgba(79, 70, 229, 0.12);
    color: var(--text-primary);
    font-weight: 600;
    box-shadow: var(--shadow-light);
    border: 1px solid var(--border-color);
}

.status-banner[hidden] {
    display: none;
}

.status-banner[data-status="success"] {
    background: rgba(5, 150, 105, 0.12);
    border-color: rgba(5, 150, 105, 0.4);
    color: var(--success-color);
}

.status-banner[data-status="warning"] {
    background: rgba(217, 119, 6, 0.12);
    border-color: rgba(217, 119, 6, 0.4);
    color: var(--warning-color);
}

.status-banner[data-status="error"] {
    background: rgba(225, 29, 72, 0.12);
    border-color: rgba(225, 29, 72, 0.4);
    color: var(--secondary-color);
}

/* Mode Selector */
.mode-selector {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    background: var(--surface-color);
    padding: 0.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
}

.mode-btn {
    flex: 1;
    padding: 0.75rem 1rem;
    border: none;
    border-radius: calc(var(--border-radius) - 2px);
    background: transparent;
    color: var(--text-secondary);
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.mode-btn:hover {
    color: var(--text-primary);
    background: var(--background-color);
}

.mode-btn.active {
    background: var(--primary-color);
    color: white;
    box-shadow: var(--shadow-medium);
}

/* Mode Content */
.mode-content {
    display: none;
}

.mode-content.active {
    display: block;
}

/* Input Section */
.input-section {
    background: var(--surface-color);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-light);
}

.input-section label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-primary);
}

textarea, input {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 1rem;
    background: var(--background-color);
    color: var(--text-primary);
    transition: var(--transition);
    font-family: inherit;
}

textarea:focus, input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgb(79 70 229 / 0.1);
}

textarea {
    resize: vertical;
    min-height: 120px;
}

/* Controls */
.wheel-controls, .list-controls, .number-controls {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
    min-width: 200px;
}

.control-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
}

.control-group input[type="number"] {
    max-width: 120px;
}

.inline-options {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    flex-wrap: wrap;
    color: var(--text-secondary);
}

.inline-option {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

input[type="checkbox"] {
    width: auto;
    margin: 0;
}

/* Wheel Container */
.wheel-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    background: var(--surface-color);
    padding: 2rem;
    border-radius: var(--border-radius);
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-light);
    position: relative;
}

#wheel-canvas {
    border-radius: 50%;
    box-shadow: var(--shadow-medium);
    max-width: 100%;
    height: auto;
}

.wheel-pointer {
    position: absolute;
    top: 2rem;
    width: 0;
    height: 0;
    border-left: 15px solid transparent;
    border-right: 15px solid transparent;
    border-bottom: 30px solid var(--secondary-color);
    z-index: 10;
    pointer-events: none;
}

/* Buttons */
.primary-btn, .secondary-btn, .spin-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.primary-btn {
    background: var(--primary-color);
    color: white;
}

.primary-btn:hover {
    background: #3730a3;
    transform: translateY(-2px);
}

.secondary-btn {
    background: var(--background-color);
    color: var(--text-primary);
    border: 2px solid var(--border-color);
}

.secondary-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.spin-btn {
    background: var(--secondary-color);
    color: white;
    font-size: 1.2rem;
    padding: 1rem 2rem;
    animation: pulse 2s infinite;
}

.spin-btn:hover {
    background: #be185d;
    transform: scale(1.05);
}

.spin-btn:disabled {
    background: var(--text-secondary);
    cursor: not-allowed;
    animation: none;
    transform: none;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}

/* Result Section */
.result-section {
    background: var(--surface-color);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-light);
    text-align: center;
    border: 2px solid var(--success-color);
}

.result-section h3 {
    margin-bottom: 1rem;
    color: var(--success-color);
    font-size: 1.5rem;
}

.result-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1rem;
    padding: 1rem;
    background: var(--background-color);
    border-radius: var(--border-radius);
    animation: fadeInUp 0.5s ease;
}

.result-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    margin-bottom: 1rem;
}

.result-item {
    background: var(--primary-color);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 600;
    animation: bounceIn 0.5s ease;
}

.number-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: 0.5rem;
    margin-bottom: 1rem;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.number-item {
    background: var(--primary-color);
    color: white;
    padding: 1rem;
    border-radius: var(--border-radius);
    font-size: 1.2rem;
    font-weight: 700;
    text-align: center;
    animation: flipIn 0.5s ease;
}

/* History Section */
.history-section {
    background: var(--surface-color);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
}

.history-section h3 {
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.history-list {
    max-height: 200px;
    overflow-y: auto;
    margin-bottom: 1rem;
}

.history-item {
    padding: 0.5rem;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.9rem;
    color: var(--text-secondary);
}

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

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes flipIn {
    from {
        transform: rotateY(-90deg);
        opacity: 0;
    }
    to {
        transform: rotateY(0);
        opacity: 1;
    }
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.wheel-spinning {
    animation: spin 3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .mode-selector {
        flex-direction: column;
    }
    
    .wheel-controls, .list-controls, .number-controls {
        flex-direction: column;
    }
    
    .control-group {
        min-width: auto;
    }
    
    #wheel-canvas {
        width: 250px;
        height: 250px;
    }
    
    .wheel-container {
        padding: 1rem;
    }
    
    .number-grid {
        grid-template-columns: repeat(auto-fit, minmax(60px, 1fr));
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.8rem;
        flex-direction: column;
        gap: 0.25rem;
    }
    
    .mode-btn {
        font-size: 0.9rem;
        padding: 0.6rem;
    }
    
    #wheel-canvas {
        width: 200px;
        height: 200px;
    }
    
    .result-text {
        font-size: 1.2rem;
    }
    
    .spin-btn {
        font-size: 1rem;
        padding: 0.8rem 1.5rem;
    }
}
