/* Shared Styles for Landing Pages */
:root {
    --accent-color: #1a73e8;
    --bg-color: #f8f9fa;
    --card-bg: #ffffff;
    --text-main: #202124;
    --text-secondary: #5f6368;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Inter', -apple-system, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.landing-header {
    background: white;
    padding: 10px 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 15px;
}

.nav-item {
    text-decoration: none;
    color: #666;
    font-weight: bold;
    font-size: 0.95rem;
    transition: color 0.2s;
}

.nav-item:hover {
    color: var(--accent-color);
}

.nav-btn {
    background: #f1f3f4;
    border: 1px solid #dadce0;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 1.1rem;
    color: var(--accent-color);
}

.nav-btn:hover {
    background: #e8f0fe;
    transform: rotate(15deg);
    border-color: var(--accent-color);
}

.nav-select {
    background: #f1f3f4;
    border: 1px solid #dadce0;
    border-radius: 20px;
    padding: 5px 10px;
    color: var(--accent-color);
    font-size: 0.9rem;
    cursor: pointer;
    outline: none;
    transition: all 0.3s;
}

.nav-select:hover {
    background: #e8f0fe;
    border-color: var(--accent-color);
}

/* Common Buttons */
.btn {
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    font-family: inherit;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

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

.btn-primary:hover {
    filter: brightness(1.1);
}

.btn-secondary {
    background: #f1f3f4;
    color: var(--text-main);
}

.btn-secondary:hover {
    background: #e8eaed;
}

@media (max-width: 768px) {
    .nav-item {
        display: none;
    }
    .nav-links {
        gap: 8px;
    }
    .landing-header {
        padding: 5px 10px;
    }
    .landing-logo {
        font-size: 1.1rem;
    }
}

.landing-logo {
    font-weight: 800;
    font-size: 1.4rem;
    color: var(--accent-color);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Wheel Top Section */
.top-section {
    padding: 10px 20px 30px 20px;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: center;
    background: linear-gradient(180deg, #ffffff 0%, #f1f3f4 100%);
    gap: 40px;
}

.wheel-main-container {
    position: relative;
    width: 460px;
    height: 460px;
    margin-bottom: 10px;
    margin-top: -50px;
    flex-shrink: 0;
}

#wheel-canvas {
    width: 100%;
    height: 100%;
    cursor: pointer;
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

#wheel-canvas:hover {
    transform: scale(1.02);
}

.spin-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 5;
    transition: opacity 0.5s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.spin-overlay svg {
    width: 100%;
    height: 100%;
}

.spin-overlay text {
    font-family: 'Inter', -apple-system, sans-serif;
    font-weight: 800;
    fill: white;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.8), 0 0 15px rgba(0, 0, 0, 0.5);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.spin-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.pointer {
    position: absolute;
    left: 94.2%;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 36px;
    background: #ff4757;
    clip-path: polygon(0% 50%, 100% 0%, 88% 50%, 100% 100%);
    z-index: 10;
    filter: drop-shadow(-5px 5px 7px rgba(0, 0, 0, 0.45));
    transition: background-color 0.1s;
    pointer-events: none;
    overflow: hidden;
}

.pointer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom,
            rgba(255, 255, 255, 0.45) 0%,
            rgba(255, 255, 255, 0.1) 48%,
            rgba(0, 0, 0, 0.2) 52%,
            rgba(0, 0, 0, 0.35) 100%);
    pointer-events: none;
}

.pointer::after {
    content: '';
    position: absolute;
    left: -5px;
    top: 50%;
    transform: translateY(-50%);
    width: 10px;
    height: 20px;
    background: inherit;
    border-radius: 5px 0 0 5px;
    filter: brightness(0.9);
}

/* Entries Box Styling */
.entries-container {
    width: 350px;
    background: white;
    padding: 20px;
    border-radius: 16px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: -50px;
}

.entries-container h3 {
    margin: 0;
    font-size: 1.1rem;
    color: var(--text-main);
}

#entries-input {
    display: block;
    /* Make visible */
    width: 100%;
    height: 250px;
    border-radius: 12px;
    border: 1px solid #ddd;
    padding: 15px;
    font-size: 1rem;
    resize: none;
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.2s;
}

#entries-input:focus {
    border-color: var(--accent-color);
}

.entries-stats {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* Description Bottom Section */
.bottom-section {
    flex: 1;
    max-width: 900px;
    margin: 0 auto;
    padding: 50px 20px;
}

.content-card {
    background: white;
    padding: 40px;
    border-radius: 24px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.content-card h1 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: var(--accent-color);
}

.content-card p {
    line-height: 1.8;
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 40px;
}

.feature-item {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
}

@media (max-width: 900px) {
    .top-section {
        flex-direction: column;
        align-items: center;
    }

    .wheel-main-container {
        width: 320px;
        height: 320px;
        margin-top: 0;
    }

    .entries-container {
        width: 100%;
        max-width: 400px;
        margin-top: 0;
    }
}

/* Hidden elements for compatibility with script.js (Only non-UI ones) */
#entry-count,
#result-count,
#volume-slider,
#btn-shuffle,
#btn-sort,
#btn-results-sort,
#btn-results-clear,
#settings-overlay {
    display: none;
}

/* Themes Backgrounds */
body.theme-japan {
    background-image: linear-gradient(rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0.4)), url('https://images.unsplash.com/photo-1493976040374-85c8e12f0c0e?q=80&w=2070&auto=format&fit=crop');
    background-size: cover; background-position: center; background-attachment: fixed;
}
body.theme-china {
    background-image: linear-gradient(rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0.4)), url('https://images.unsplash.com/photo-1540611025311-01df3cef54b5?q=80&w=2070&auto=format&fit=crop');
    background-size: cover; background-position: center; background-attachment: fixed;
}
body.theme-france {
    background-image: linear-gradient(rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0.4)), url('https://images.unsplash.com/photo-1502602898657-3e91760cbb34?q=80&w=2073&auto=format&fit=crop');
    background-size: cover; background-position: center; background-attachment: fixed;
}
body.theme-mexico {
    background-image: linear-gradient(rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0.4)), url('https://images.unsplash.com/photo-1518105779142-d975f22f1b0a?q=80&w=2070&auto=format&fit=crop');
    background-size: cover; background-position: center; background-attachment: fixed;
}
body.theme-england {
    background-image: linear-gradient(rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0.4)), url('https://images.unsplash.com/photo-1513635269975-59663e0ac1ad?q=80&w=2070&auto=format&fit=crop');
    background-size: cover; background-position: center; background-attachment: fixed;
}
body.theme-german {
    background-image: linear-gradient(rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0.4)), url('https://images.unsplash.com/photo-1467269204594-9661b134dd2b?q=80&w=2070&auto=format&fit=crop');
    background-size: cover; background-position: center; background-attachment: fixed;
}
body.theme-us {
    background-image: linear-gradient(rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0.4)), url('https://images.unsplash.com/photo-1485738422979-f5c462d49f74?q=80&w=2070&auto=format&fit=crop');
    background-size: cover; background-position: center; background-attachment: fixed;
}
body.theme-korea {
    background-image: linear-gradient(rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0.4)), url('https://images.unsplash.com/photo-1517154421773-0529f29ea451?q=80&w=2070&auto=format&fit=crop');
    background-size: cover; background-position: center; background-attachment: fixed;
}
body.theme-vietnam {
    background-image: linear-gradient(rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0.4)), url('https://images.unsplash.com/photo-1528127269322-539801943592?q=80&w=2070&auto=format&fit=crop');
    background-size: cover; background-position: center; background-attachment: fixed;
}

/* Result Overlay */
.result-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 100;
}

.result-card {
    background: white;
    padding: 40px;
    border-radius: 20px;
    text-align: center;
}

/* Settings Modal Styles */
#settings-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 200;
    backdrop-filter: blur(5px);
}

.settings-modal {
    background: white;
    width: 90%;
    max-width: 600px;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.settings-header {
    display: flex;
    border-bottom: 1px solid #eee;
}

.settings-tab {
    flex: 1;
    padding: 15px;
    text-align: center;
    cursor: pointer;
    font-weight: 500;
    color: #666;
    transition: all 0.2s;
    border-bottom: 3px solid transparent;
}

.settings-tab.active {
    color: #1a73e8;
    border-bottom-color: #1a73e8;
}

.settings-content {
    padding: 25px;
    max-height: 70vh;
    overflow-y: auto;
    text-align: left;
}

.settings-group {
    margin-bottom: 25px;
}

.settings-group h4 {
    margin-bottom: 15px;
    color: #333;
    font-size: 1.1rem;
    border-bottom: 1px solid #eee;
    padding-bottom: 8px;
}

.settings-row {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.settings-row label {
    flex: 1;
    font-size: 0.95rem;
    color: #555;
}

.settings-control {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.settings-footer {
    padding: 15px 25px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    background: #f9f9f9;
}

.settings-icon-btn {
    background: #eee;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.settings-icon-btn:hover {
    background: #e0e0e0;
}

/* Toggle Switch */
.switch {
    position: relative;
    display: inline-block;
    width: 46px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider-toggle {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 24px;
}

.slider-toggle:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider-toggle {
    background-color: #1a73e8;
}

input:checked + .slider-toggle:before {
    transform: translateX(22px);
}

.settings-input {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-family: inherit;
}

.settings-select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: white;
    min-width: 150px;
}

.settings-slider {
    flex: 1;
    min-width: 100px;
}

/* Fullscreen Styles */
body.fullscreen-mode {
    overflow: hidden;
}

body.fullscreen-mode .hero-section,
body.fullscreen-mode .seo-section,
body.fullscreen-mode .landing-footer,
body.fullscreen-mode .entries-container,
body.fullscreen-mode h1,
body.fullscreen-mode .hero-desc {
    display: none !important;
}

body.fullscreen-mode .landing-header {
    background: transparent;
    border-bottom: none;
}

body.fullscreen-mode .landing-logo {
    display: none;
}

body.fullscreen-mode main {
    max-width: none;
    padding: 0;
    margin: 0;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

body.fullscreen-mode .top-section {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

body.fullscreen-mode .wheel-main-container {
    transform: scale(1.3);
}

@media (max-width: 600px) {
    .landing-header {
        flex-direction: column;
        padding: 15px 10px;
        gap: 15px;
    }

    .landing-logo {
        font-size: 1.1rem;
    }

    .nav-links {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
        gap: 10px;
    }

    .nav-btn {
        width: 32px;
        height: 32px;
        font-size: 1rem;
    }

    .wheel-main-container {
        width: 300px;
        height: 300px;
    }

    .content-card h1 {
        font-size: 1.8rem;
    }
}

/* SEO & Content Sections */
.seo-section {
    max-width: 1000px;
    margin: 60px auto;
    padding: 0 20px;
}

.seo-content h2 {
    font-size: 2rem;
    color: #333;
    margin: 40px 0 20px 0;
    border-left: 5px solid var(--accent-color);
    padding-left: 15px;
}

.seo-content p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #444;
    margin-bottom: 20px;
}

.seo-content ul {
    margin-bottom: 20px;
    padding-left: 20px;
    list-style-type: disc;
}

.seo-content li {
    margin-bottom: 10px;
    font-size: 1.1rem;
    color: #444;
}

/* FAQ Section */
.faq-section {
    background: #f9f9f9;
    padding: 60px 40px;
    border-radius: 30px;
    margin-top: 60px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
}

.faq-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    max-width: 100%;
    margin: 40px auto 0 auto;
}

.faq-item h3 {
    font-size: 1.3rem;
    color: var(--accent-color);
    margin-bottom: 15px;
    font-weight: 700;
}

.faq-item p {
    color: #666;
    line-height: 1.6;
    font-size: 1rem;
}

@media (max-width: 768px) {
    .faq-section {
        padding: 40px 20px;
    }

    .seo-content h2 {
        font-size: 1.6rem;
    }
}