:root {
    --primary-color: #4ECDC4;
    --secondary-color: #45B7D1;
    --danger-color: #FF6B6B;
    --success-color: #52C777;
    --dark-color: #2C3E50;
    --light-color: #F8F9FA;
    --border-radius: 8px;
    --transition: all 0.3s ease;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    line-height: 1.6;
    color: var(--dark-color);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

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

/* Hero Section */
.hero-section {
    background: rgba(255, 255, 255, 0.98);
    padding: 3rem 0 2rem;
    text-align: center;
    margin-bottom: 2rem;
}

.hero-title {
    font-size: 2.5rem;
    color: var(--dark-color);
    margin-bottom: 1.5rem;
    line-height: 1.3;
}

.hero-description {
    font-size: 1.2rem;
    color: #555;
    max-width: 800px;
    margin: 0 auto 2rem;
    line-height: 1.6;
}

.hero-features {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.hero-features .feature {
    background: var(--primary-color);
    color: white;
    padding: 0.5rem 1.5rem;
    border-radius: 25px;
    font-weight: 500;
}

.site-header {
    background: rgba(255, 255, 255, 0.98);
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    font-size: 1.8rem;
    color: var(--primary-color);
    font-weight: bold;
    margin: 0;
}

.tagline {
    color: #666;
    font-size: 0.9rem;
    margin: 0;
}

.main-content {
    padding: 2rem 0;
}

.wheel-section {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 2rem;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

.wheel-container {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(255, 255, 255, 0.98);
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

#wheelCanvas {
    max-width: 100%;
    height: auto;
}

.spin-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    width: 80px;
    height: 80px;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(78, 205, 196, 0.4);
}

.spin-button:hover {
    transform: translate(-50%, -50%) scale(1.1);
    box-shadow: 0 6px 20px rgba(78, 205, 196, 0.6);
}

.spin-button:active {
    transform: translate(-50%, -50%) scale(0.95);
}

.spin-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.controls-panel {
    background: rgba(255, 255, 255, 0.98);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.control-group {
    margin-bottom: 1.5rem;
}

.control-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--dark-color);
}

.input-group {
    display: flex;
    gap: 0.5rem;
}

.input-group input {
    flex: 1;
    padding: 0.5rem;
    border: 2px solid #E0E0E0;
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: var(--transition);
}

.input-group input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
}

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

.btn-primary:hover {
    background: #3DBDB4;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(78, 205, 196, 0.3);
}

.btn-secondary {
    background: #6C757D;
    color: white;
}

.btn-secondary:hover {
    background: #5A6268;
}

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

.btn-danger:hover {
    background: #FF5252;
}

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

.btn-share:hover {
    background: #3AA3BD;
}

#speedSlider {
    width: 70%;
    margin-right: 1rem;
}

.checkboxes label {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
    cursor: pointer;
}

.checkboxes input[type="checkbox"] {
    margin-right: 0.5rem;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.items-list {
    max-height: 200px;
    overflow-y: auto;
    border: 2px solid #E0E0E0;
    border-radius: var(--border-radius);
    padding: 0.5rem;
    margin-bottom: 1rem;
}

.item-entry {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem;
    margin-bottom: 0.25rem;
    background: var(--light-color);
    border-radius: 4px;
}

.item-text {
    flex: 1;
}

.item-weight {
    margin: 0 0.5rem;
    color: #666;
    font-size: 0.9rem;
}

.item-remove {
    background: none;
    border: none;
    color: var(--danger-color);
    cursor: pointer;
    font-size: 1.2rem;
    padding: 0 0.5rem;
}

.item-remove:hover {
    color: #FF5252;
}

.control-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
}

.control-buttons .btn {
    width: 100%;
}

.control-buttons .btn-danger {
    grid-column: span 2;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    max-width: 500px;
    width: 90%;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-content h2 {
    margin-bottom: 1rem;
    color: var(--primary-color);
}

#winnerText {
    font-size: 1.5rem;
    font-weight: bold;
    margin: 1rem 0;
    text-align: center;
}

#bulkTextarea {
    width: 100%;
    padding: 0.5rem;
    border: 2px solid #E0E0E0;
    border-radius: var(--border-radius);
    font-family: inherit;
    resize: vertical;
}

.modal-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.modal-buttons .btn {
    flex: 1;
}

.discovery-section {
    margin-top: 4rem;
    background: rgba(255, 255, 255, 0.98);
    padding: 3rem 0;
}

.section-intro {
    text-align: center;
    font-size: 1.1rem;
    color: #666;
    max-width: 800px;
    margin: 0 auto 2rem;
    line-height: 1.6;
}

.content-section {
    max-width: 900px;
    margin: 3rem auto;
    padding: 0 20px;
}

.content-section h2 {
    color: var(--dark-color);
    margin-bottom: 1rem;
    font-size: 1.8rem;
}

.content-section h3 {
    color: var(--primary-color);
    margin: 1.5rem 0 1rem;
    font-size: 1.4rem;
}

.content-section p {
    color: #555;
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.content-section ol, .content-section ul {
    margin: 1rem 0 1.5rem 2rem;
    line-height: 1.8;
}

.content-section li {
    margin-bottom: 0.8rem;
    color: #555;
}

.discovery-section h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 2rem;
    color: var(--dark-color);
}

.discovery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.discovery-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    text-align: center;
    text-decoration: none;
    color: var(--dark-color);
    transition: var(--transition);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    cursor: pointer;
}

.discovery-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

.card-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.discovery-card h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.discovery-card p {
    font-size: 0.9rem;
    color: #666;
}

.search-section {
    max-width: 600px;
    margin: 2rem auto;
}

#searchInput {
    width: 100%;
    padding: 1rem;
    font-size: 1.1rem;
    border: 2px solid #E0E0E0;
    border-radius: var(--border-radius);
    transition: var(--transition);
}

#searchInput:focus {
    outline: none;
    border-color: var(--primary-color);
}

.categories-section {
    margin-top: 3rem;
}

.categories-section h3 {
    text-align: center;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.category-tabs {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.category-tab {
    padding: 0.5rem 1.5rem;
    background: white;
    border: 2px solid #E0E0E0;
    border-radius: 25px;
    cursor: pointer;
    transition: var(--transition);
}

.category-tab.active,
.category-tab:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.category-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.site-footer {
    background: rgba(255, 255, 255, 0.98);
    padding: 2rem 0;
    margin-top: 4rem;
    text-align: center;
}

.footer-nav {
    margin-top: 1rem;
}

.footer-nav a {
    margin: 0 1rem;
    color: var(--primary-color);
    text-decoration: none;
}

.footer-nav a:hover {
    text-decoration: underline;
}

@media (max-width: 1024px) {
    .wheel-section {
        grid-template-columns: 1fr;
    }
    
    .wheel-container {
        min-height: 60vh;
    }
    
    .controls-panel {
        max-width: 600px;
        margin: 0 auto;
    }
}

@media (max-width: 768px) {
    .site-header {
        text-align: center;
    }
    
    .discovery-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 1rem;
    }
    
    .card-icon {
        font-size: 2rem;
    }
    
    .discovery-card h3 {
        font-size: 1rem;
    }
    
    .discovery-card p {
        font-size: 0.8rem;
    }
    
    .control-buttons {
        grid-template-columns: 1fr;
    }
    
    .control-buttons .btn-danger {
        grid-column: span 1;
    }
}