/* ========================================
   Random Wheel Game - CSS Styles
   ======================================== */

/* CSS Variables */
:root {
    --primary: #6366F1;
    --primary-dark: #4F46E5;
    --secondary: #EC4899;
    --success: #10B981;
    --warning: #F59E0B;
    --bg-light: #F8FAFC;
    --bg-dark: #0F172A;
    --text-dark: #1E293B;
    --text-light: #64748B;
    --white: #FFFFFF;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --radius: 16px;
    --radius-sm: 8px;
    --transition: all 0.3s ease;
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.6;
    min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    line-height: 1.3;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

img {
    max-width: 100%;
    height: auto;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ========================================
   Header & Navigation
   ======================================== */
.header {
    background: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    font-family: 'Poppins', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo-icon {
    width: 32px;
    height: 32px;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 32px;
}

.nav-menu a {
    color: var(--text-light);
    font-weight: 500;
    position: relative;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--primary);
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: var(--transition);
}

.nav-menu a:hover::after,
.nav-menu a.active::after {
    width: 100%;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 5px;
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--text-dark);
    border-radius: 2px;
    transition: var(--transition);
}

/* ========================================
   Hero Section
   ======================================== */
.hero {
    padding: 60px 0 40px;
    text-align: center;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: var(--white);
    min-height: 500px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 16px;
}

.hero p {
    font-size: 1.125rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto 30px;
}

/* ========================================
   Wheel Container
   ======================================== */
.wheel-section {
    margin-top: -80px;
    padding: 0 20px;
}

.wheel-container {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: 30px;
    max-width: 500px;
    margin: 0 auto;
}

.wheel-wrapper {
    position: relative;
    width: 100%;
    max-width: 400px;
    margin: 0 auto 20px;
}

.wheel-canvas {
    width: 100%;
    height: auto;
    border-radius: 50%;
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.3);
}

.pointer {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 40px;
    z-index: 10;
}

.pointer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    border-left: 15px solid transparent;
    border-right: 15px solid transparent;
    border-top: 40px solid var(--primary);
}

.pointer::after {
    content: '';
    position: absolute;
    top: 5px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 25px solid var(--white);
}

.wheel-controls {
    text-align: center;
}

.spin-btn {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
    border: none;
    padding: 16px 48px;
    font-size: 1.125rem;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow);
}

.spin-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

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

.spin-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.result-display {
    margin-top: 20px;
    padding: 16px;
    background: var(--bg-light);
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 1.125rem;
    color: var(--primary);
    display: none;
}

.result-display.show {
    display: block;
    animation: fadeIn 0.3s ease;
}

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

/* ========================================
   Slice Editor
   ======================================== */
.slice-editor {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid #E2E8F0;
}

.slice-editor h3 {
    font-size: 1.125rem;
    margin-bottom: 16px;
    color: var(--text-dark);
}

.slice-input-group {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.slice-input-group input[type="text"] {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #E2E8F0;
    border-radius: var(--radius-sm);
    font-size: 1rem;
    transition: var(--transition);
}

.slice-input-group input[type="text"]:focus {
    outline: none;
    border-color: var(--primary);
}

.slice-input-group input[type="color"] {
    width: 50px;
    height: 48px;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
}

.add-slice-btn {
    background: var(--success);
    color: var(--white);
    border: none;
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: 500;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
}

.add-slice-btn:hover {
    background: #0D9668;
}

.slice-list {
    list-style: none;
    max-height: 200px;
    overflow-y: auto;
}

.slice-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    background: var(--bg-light);
    border-radius: var(--radius-sm);
    margin-bottom: 8px;
}

.slice-color {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    flex-shrink: 0;
}

.slice-label {
    flex: 1;
    font-size: 0.9375rem;
}

.slice-delete {
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    font-size: 1.25rem;
    padding: 4px;
    transition: var(--transition);
}

.slice-delete:hover {
    color: #EF4444;
}

.elimination-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 16px;
    font-size: 0.875rem;
    color: var(--text-light);
}

.toggle-switch {
    position: relative;
    width: 44px;
    height: 24px;
    background: #E2E8F0;
    border-radius: 12px;
    cursor: pointer;
    transition: var(--transition);
}

.toggle-switch.active {
    background: var(--primary);
}

.toggle-switch::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background: var(--white);
    border-radius: 50%;
    transition: var(--transition);
}

.toggle-switch.active::after {
    left: 22px;
}

/* ========================================
   Features Section
   ======================================== */
.features {
    padding: 60px 0;
    background: var(--white);
}

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

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.feature-card {
    text-align: center;
    padding: 30px 20px;
    background: var(--bg-light);
    border-radius: var(--radius);
    transition: var(--transition);
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 16px;
}

.feature-card h3 {
    font-size: 1.25rem;
    margin-bottom: 12px;
    color: var(--text-dark);
}

.feature-card p {
    color: var(--text-light);
    font-size: 0.9375rem;
}

/* ========================================
   Use Cases Section
   ======================================== */
.use-cases {
    padding: 60px 0;
    background: var(--bg-light);
}

.use-cases h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 40px;
    color: var(--text-dark);
}

.use-cases-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.use-case-item {
    text-align: center;
    padding: 24px 16px;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.use-case-icon {
    font-size: 2.5rem;
    margin-bottom: 12px;
}

.use-case-item h4 {
    font-size: 1rem;
    color: var(--text-dark);
}

/* ========================================
   FAQ Section
   ======================================== */
.faq {
    padding: 60px 0;
    background: var(--white);
}

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

.faq-list {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    border-bottom: 1px solid #E2E8F0;
    margin-bottom: 16px;
}

.faq-question {
    width: 100%;
    padding: 20px 0;
    background: none;
    border: none;
    text-align: left;
    font-size: 1.0625rem;
    font-weight: 600;
    color: var(--text-dark);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: 'Poppins', sans-serif;
}

.faq-question::after {
    content: '+';
    font-size: 1.5rem;
    color: var(--primary);
    transition: var(--transition);
}

.faq-item.active .faq-question::after {
    content: '-';
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.faq-item.active .faq-answer {
    max-height: 200px;
}

.faq-answer p {
    padding-bottom: 20px;
    color: var(--text-light);
    line-height: 1.7;
}

/* ========================================
   Footer
   ======================================== */
.footer {
    background: var(--bg-dark);
    color: var(--white);
    padding: 60px 0 30px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-brand h3 {
    font-size: 1.5rem;
    margin-bottom: 16px;
    color: var(--white);
}

.footer-brand p {
    color: #94A3B8;
    font-size: 0.9375rem;
    line-height: 1.7;
}

.footer-links h4 {
    font-size: 1rem;
    margin-bottom: 16px;
    color: var(--white);
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: #94A3B8;
    font-size: 0.9375rem;
}

.footer-links a:hover {
    color: var(--white);
}

.footer-bottom {
    border-top: 1px solid #334155;
    padding-top: 30px;
    text-align: center;
    color: #64748B;
    font-size: 0.875rem;
}

/* ========================================
   Content Pages (About, Contact, etc.)
   ======================================== */
.page-content {
    padding: 60px 0;
}

.page-header {
    text-align: center;
    margin-bottom: 50px;
}

.page-header h1 {
    font-size: 2.5rem;
    margin-bottom: 16px;
    color: var(--text-dark);
}

.page-header p {
    color: var(--text-light);
    font-size: 1.125rem;
    max-width: 600px;
    margin: 0 auto;
}

.content-section {
    max-width: 800px;
    margin: 0 auto 40px;
}

.content-section h2 {
    font-size: 1.5rem;
    margin-bottom: 16px;
    color: var(--text-dark);
}

.content-section p {
    color: var(--text-light);
    margin-bottom: 16px;
    line-height: 1.8;
}

.content-section ul {
    list-style: disc;
    padding-left: 24px;
    color: var(--text-light);
    margin-bottom: 16px;
}

.content-section li {
    margin-bottom: 8px;
}

/* ========================================
   Contact Form
   ======================================== */
.contact-form {
    max-width: 600px;
    margin: 0 auto;
    background: var(--white);
    padding: 40px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--text-dark);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #E2E8F0;
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-family: inherit;
    transition: var(--transition);
}

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

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

.submit-btn {
    width: 100%;
    background: var(--primary);
    color: var(--white);
    border: none;
    padding: 14px 24px;
    font-size: 1rem;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
}

.submit-btn:hover {
    background: var(--primary-dark);
}

.contact-info {
    text-align: center;
    margin-top: 40px;
}

.contact-info p {
    color: var(--text-light);
    margin-bottom: 8px;
}

/* ========================================
   Responsive Design
   ======================================== */
@media (max-width: 1024px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .use-cases-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }
    
    .nav-menu {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--white);
        flex-direction: column;
        padding: 20px;
        gap: 16px;
        box-shadow: var(--shadow);
        display: none;
    }
    
    .nav-menu.active {
        display: flex;
    }
    
    .hero {
        padding: 40px 0 30px;
        min-height: auto;
    }
    
    .hero h1 {
        font-size: 1.75rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .wheel-section {
        margin-top: -40px;
    }
    
    .wheel-container {
        padding: 20px;
    }
    
    .wheel-wrapper {
        max-width: 280px;
    }
    
    .spin-btn {
        padding: 14px 36px;
        font-size: 1rem;
    }
    
    .features {
        padding: 30px 0;
    }
    
    .features h2 {
        font-size: 1.5rem;
        margin-bottom: 24px;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .use-cases {
        padding: 30px 0;
    }
    
    .use-cases h2 {
        font-size: 1.5rem;
        margin-bottom: 24px;
    }
    
    .use-cases-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .faq {
        padding: 30px 0;
    }
    
    .faq h2 {
        font-size: 1.5rem;
        margin-bottom: 24px;
    }
    
    .footer {
        padding: 24px 0 16px;
    }
    
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
        text-align: left;
    }
    
    .footer-brand {
        grid-column: 1 / -1;
        text-align: center;
        padding-bottom: 8px;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }
    
    .footer-brand h3 {
        font-size: 1.25rem;
        margin-bottom: 8px;
    }
    
    .footer-brand p {
        font-size: 0.875rem;
        max-width: 400px;
        margin: 0 auto;
    }
    
    .footer-links h4 {
        font-size: 0.9375rem;
        margin-bottom: 12px;
    }
    
    .footer-links li {
        margin-bottom: 6px;
    }
    
    .footer-links a {
        font-size: 0.875rem;
    }
    
    .page-header h1 {
        font-size: 1.75rem;
    }
    
    .contact-form {
        padding: 24px;
    }
}

/* ========================================
   Utilities
   ======================================== */
.text-center {
    text-align: center;
}

.mt-4 {
    margin-top: 16px;
}

.mb-4 {
    margin-bottom: 16px;
}
