/* Global Styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    background-color: #f8f9fa;
    color: #333;
    transition: background-color 0.3s, color 0.3s;
    line-height: 1.6;
}

body.dark-theme {
    background-color: #1a1a1a;
    color: #e0e0e0;
}

/* Header & Nav */
header {
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 0.5rem 0;
}

body.dark-theme header {
    background-color: #2d2d2d;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: #4CAF50;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 1.5rem;
    margin: 0;
    padding: 0;
}

nav a {
    text-decoration: none;
    color: #555;
    font-weight: 500;
    transition: color 0.3s;
}

nav a:hover {
    color: #4CAF50;
}

body.dark-theme nav a {
    color: #bbb;
}

body.dark-theme nav a:hover {
    color: #4CAF50;
}

/* Theme Button in Header */
#theme-toggle-btn {
    position: static; /* Reset absolute positioning */
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 20px;
    padding: 0.5rem 1rem;
    cursor: pointer;
    font-size: 0.9rem;
    transition: transform 0.2s, box-shadow 0.2s;
}

body.dark-theme #theme-toggle-btn {
    background: linear-gradient(135deg, #f6d365 0%, #fda085 100%);
    color: #333;
}

#theme-toggle-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

/* Main Container */
.container {
    max-width: 900px;
    margin: 2rem auto;
    padding: 0 1rem;
}

/* Hero Section */
#hero {
    text-align: center;
    padding: 3rem 1rem;
}

#hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #2c3e50;
}

body.dark-theme #hero h1 {
    color: #ecf0f1;
}

.intro-text {
    font-size: 1.1rem;
    max-width: 700px;
    margin: 0 auto;
    color: #666;
}

body.dark-theme .intro-text {
    color: #aaa;
}

/* Sections & Dividers */
.feature-section {
    padding: 3rem 0;
}

.divider {
    border: 0;
    height: 1px;
    background: #e0e0e0;
    margin: 0;
}

body.dark-theme .divider {
    background: #444;
}

.content-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    text-align: center;
}

.text-content {
    max-width: 700px;
}

.text-content h2 {
    color: #333;
    font-size: 2rem;
    margin-bottom: 1rem;
}

body.dark-theme .text-content h2 {
    color: #f0f0f0;
}

.text-content p {
    margin-bottom: 1rem;
}

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

/* Lotto Styles */
#lotto-container {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.lotto-ball {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    font-weight: bold;
    color: white;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2), 0 6px 20px rgba(0, 0, 0, 0.19);
}

/* Buttons */
button {
    font-family: inherit;
}

#generate-btn, #start-game-btn, #play-rps-btn, #submit-btn {
    padding: 0.8rem 1.5rem;
    font-size: 1.1rem;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

#generate-btn {
    background-color: #4CAF50;
}
#generate-btn:hover {
    background-color: #45a049;
    transform: translateY(-2px);
}

#start-game-btn, #play-rps-btn {
    background-color: #2196F3;
    margin: 0.5rem;
}
#start-game-btn:hover, #play-rps-btn:hover {
    background-color: #1976D2;
    transform: translateY(-2px);
}

#submit-btn {
    background-color: #FF5722;
    width: 100%;
}
#submit-btn:hover {
    background-color: #E64A19;
}

/* RPS Game Styles */
#rps-game-section {
    background-color: transparent;
    box-shadow: none;
}

.game-container {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

body.dark-theme .game-container {
    background: #2d2d2d;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

#webcam-container {
    margin-bottom: 1rem;
    border-radius: 10px;
    overflow: hidden;
    display: inline-block;
}

#webcam-container canvas {
    display: block;
}

#rps-result {
    font-size: 1.25rem;
    font-weight: bold;
    margin: 1rem 0;
    min-height: 3rem;
    color: #333;
}

body.dark-theme #rps-result {
    color: #fff;
}

.instructions-list {
    text-align: left;
    display: inline-block;
    color: #666;
}

body.dark-theme .instructions-list {
    color: #bbb;
}

/* Form Styles */
.partnership-form {
    background: white;
    padding: 3rem 2rem;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
    max-width: 600px;
    margin: 0 auto;
}

body.dark-theme .partnership-form {
    background: #2d2d2d;
}

.form-intro {
    text-align: center;
    margin-bottom: 2rem;
    color: #666;
}

body.dark-theme .form-intro {
    color: #aaa;
}

.form-group {
    margin-bottom: 1rem;
}

input, textarea {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
    box-sizing: border-box;
    font-family: inherit;
}

body.dark-theme input, body.dark-theme textarea {
    background: #444;
    border-color: #555;
    color: white;
}

input:focus, textarea:focus {
    outline: none;
    border-color: #4CAF50;
}

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

/* Disqus */
#disqus_section {
    margin-top: 3rem;
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
}

body.dark-theme #disqus_section {
    background: #2d2d2d;
}

/* Footer */
footer {
    background-color: #fff;
    padding: 2rem 0;
    margin-top: 4rem;
    border-top: 1px solid #eee;
    text-align: center;
}

body.dark-theme footer {
    background-color: #2d2d2d;
    border-top: 1px solid #444;
}

.footer-content p {
    color: #888;
    margin-bottom: 1rem;
}

.footer-nav a {
    color: #666;
    text-decoration: none;
    margin: 0 0.5rem;
    font-size: 0.9rem;
}

.footer-nav a:hover {
    color: #4CAF50;
    text-decoration: underline;
}

body.dark-theme .footer-nav a {
    color: #aaa;
}

/* Responsive */
@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        gap: 1rem;
    }
    
    nav ul {
        gap: 1rem;
    }

    h1 {
        font-size: 2rem;
    }
    
    .text-content h2 {
        font-size: 1.75rem;
    }
}