﻿
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --orange: #FF7A00;
    --orange-light: #FF9933;
    --orange-glow: rgba(255,122,0,0.25);
    --green: #3CAB5A;
    --green-light: #E8F7ED;
    --yellow: #FFF3CD;
    --bg: #DCE9F5;
    --white: #FFFFFF;
    --gray-50: #F8F9FA;
    --gray-100: #F1F3F5;
    --gray-200: #E9ECEF;
    --gray-400: #ADB5BD;
    --gray-600: #6C757D;
    --gray-800: #343A40;
    --shadow-sm: 0 1px 4px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.1);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.13);
    --radius: 14px;
    --font-display: 'Nunito', sans-serif;
    --font-body: 'Inter', sans-serif;
}

body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--gray-800);
    overflow-x: hidden;
}

/* NAV */
nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
    box-shadow: var(--shadow-sm);
}

.nav-inner {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 2rem;
    padding: 0 1.5rem;
    height: 60px;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    flex-shrink: 0;
}

.nav-logo-icon {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.13);
    padding: 3px;
    flex-shrink: 0;
}

    .nav-logo-icon svg {
        width: 36px;
        height: 36px;
    }

.nav-logo-text {
    font-family: var(--font-display);
    font-weight: 900;
    font-size: 1.15rem;
    color: var(--gray-800);
    letter-spacing: -0.3px;
    line-height: 1;
}

    .nav-logo-text .logo-the {
        color: #5A6A7A;
        font-weight: 700;
        font-size: 0.95rem;
    }

    .nav-logo-text .logo-wheel {
        color: var(--gray-800);
    }

    .nav-logo-text .logo-of {
        color: #5A6A7A;
        font-weight: 700;
        font-size: 0.95rem;
    }

    .nav-logo-text .logo-name {
        color: #E5292A;
    }

    .nav-logo-text .logo-dot {
        color: #5A6A7A;
        font-weight: 700;
        font-size: 0.85rem;
    }

.nav-links {
    display: flex;
    gap: 0.2rem;
    align-items: center;
    flex: 1;
}

    .nav-links a {
        font-size: 0.875rem;
        font-weight: 600;
        color: var(--gray-600);
        text-decoration: none;
        padding: 0.4rem 0.75rem;
        border-radius: 8px;
        display: flex;
        align-items: center;
        gap: 4px;
        transition: background 0.15s, color 0.15s;
    }

        .nav-links a:hover {
            background: var(--gray-100);
            color: var(--gray-800);
        }

/* DROPDOWNS */
.nav-dropdown {
    position: relative;
}

.nav-drop-trigger {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gray-600);
    text-decoration: none;
    padding: 0.4rem 0.75rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: background 0.15s, color 0.15s;
    cursor: pointer;
    white-space: nowrap;
}

    .nav-drop-trigger:hover,
    .nav-dropdown.open .nav-drop-trigger {
        background: var(--gray-100);
        color: var(--gray-800);
    }
/* Remove CSS-only hover — JS handles open/close */
.nav-drop-menu {
    position: absolute;
    top: calc(100% + 2px);
    left: 0;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    min-width: 220px;
    padding: 8px 0;
    z-index: 200;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-6px);
    transition: opacity 0.18s, transform 0.18s;
}
    /* Invisible bridge so mouse can travel from trigger to menu without gap */
    .nav-drop-menu::before {
        content: '';
        position: absolute;
        top: -10px;
        left: 0;
        width: 100%;
        height: 12px;
        background: transparent;
    }

.nav-dropdown.open .nav-drop-menu {
    opacity: 1;
    pointer-events: all;
    transform: translateY(0);
}

.drop-section-label {
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--gray-400);
    padding: 8px 14px 4px;
}

.drop-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 14px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--gray-700, #495057);
    text-decoration: none;
    transition: background 0.12s, color 0.12s;
    border-radius: 0;
}

    .drop-item:hover {
        background: #FFF5EE;
        color: var(--orange);
    }

    .drop-item.active-drop {
        color: var(--orange);
        background: #FFF3E0;
    }

.nav-profile {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px;
    color: var(--gray-600);
    border: none;
    transition: background 0.15s;
}

    .nav-profile:hover {
        background: var(--gray-100);
    }

/* BREADCRUMB */
.breadcrumb {
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
    padding: 0.5rem 0;
}

.breadcrumb-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    color: var(--gray-600);
}

    .breadcrumb-inner a {
        color: #4A90D9;
        text-decoration: none;
        font-weight: 500;
    }

        .breadcrumb-inner a:hover {
            text-decoration: underline;
        }

.breadcrumb-sep {
    color: var(--gray-400);
}

.breadcrumb-current {
    color: var(--gray-800);
    font-weight: 600;
}

/* HERO */
.hero {
    max-width: 1280px;
    margin: 0 auto;
    padding: 2rem 1.5rem 1.5rem;
    display: grid;
    grid-template-columns: 1fr 420px;
    gap: 2rem;
    align-items: start;
}

/* WHEEL SECTION */
.wheel-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    position: relative;
}

.wheel-title-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 0.25rem;
}

.wheel-title {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 900;
    color: var(--gray-800);
}

.wheel-subtitle {
    color: var(--gray-600);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.edit-btn {
    width: 28px;
    height: 28px;
    background: #EEF2FF;
    border: none;
    border-radius: 6px;
    color: #5C6BC0;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* FLOATING ACTIONS */
.floating-actions {
    position: absolute;
    left: -10px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 10;
}

.float-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 10px;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--gray-700, #495057);
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.2s, transform 0.2s;
    white-space: nowrap;
}

    .float-btn:hover {
        box-shadow: var(--shadow-md);
        transform: translateX(-2px);
    }

.float-icon {
    font-size: 16px;
}

/* WHEEL CANVAS WRAPPER */
.wheel-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 80px;
}
/* In fullscreen, wheel-wrapper loses the left margin */
#wheelFullscreenTarget:fullscreen .wheel-wrapper,
#wheelFullscreenTarget:-webkit-full-screen .wheel-wrapper {
    margin-left: 0;
}

.wheel-pointer {
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 36px;
    z-index: 20;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

canvas#wheelCanvas {
    border-radius: 50%;
    box-shadow: 0 8px 40px rgba(0,0,0,0.18), 0 0 0 6px white, 0 0 0 8px var(--gray-200);
    cursor: pointer;
    transition: filter 0.2s;
}

    canvas#wheelCanvas:hover {
        filter: brightness(1.04);
    }

/* SPIN CONTROLS */
.wheel-controls {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-left: 80px;
}

.btn-spin {
    background: var(--orange);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 14px 40px;
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 900;
    cursor: pointer;
    letter-spacing: 1px;
    box-shadow: 0 4px 16px var(--orange-glow), 0 0 0 0 var(--orange-glow);
    transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
}

    .btn-spin:hover {
        transform: scale(1.06);
        box-shadow: 0 6px 24px rgba(255,122,0,0.45), 0 0 0 6px var(--orange-glow);
        background: var(--orange-light);
    }

    .btn-spin:active {
        transform: scale(0.97);
    }

.btn-secondary {
    background: var(--white);
    color: var(--gray-800);
    border: 1.5px solid var(--gray-200);
    border-radius: 10px;
    padding: 12px 20px;
    font-size: 0.875rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: background 0.15s, box-shadow 0.15s, transform 0.15s;
    box-shadow: var(--shadow-sm);
}

    .btn-secondary:hover {
        background: var(--gray-100);
        transform: translateY(-1px);
        box-shadow: var(--shadow-md);
    }

/* CONTROL PANEL */
.control-panel {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--gray-200);
    overflow: hidden;
}

.panel-tabs {
    display: flex;
    border-bottom: 1px solid var(--gray-200);
    padding: 0 1rem;
    gap: 0;
    position: relative;
}

.panel-tab {
    background: none;
    border: none;
    padding: 0.9rem 1rem;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--gray-600);
    display: flex;
    align-items: center;
    gap: 5px;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: color 0.15s;
}

    .panel-tab.active {
        color: var(--orange);
        border-bottom-color: var(--orange);
    }

.panel-tab-actions {
    margin-left: auto;
    display: flex;
    gap: 4px;
    align-items: center;
}

.icon-btn {
    width: 30px;
    height: 30px;
    background: var(--gray-100);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-600);
    transition: background 0.15s;
}

    .icon-btn:hover {
        background: var(--gray-200);
    }

.panel-body {
    padding: 1rem;
}

.tab-content {
    display: none;
}

    .tab-content.active {
        display: block;
    }

/* ENTRIES */
.entries-count {
    display: inline-block;
    background: var(--gray-100);
    border-radius: 20px;
    padding: 3px 12px;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--gray-700, #495057);
    margin-bottom: 12px;
}

.entries-search-row {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.entries-search {
    flex: 1;
    border: 1.5px solid var(--gray-200);
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 0.85rem;
    color: var(--gray-800);
    outline: none;
    transition: border-color 0.15s;
}

    .entries-search:focus {
        border-color: var(--orange);
    }

.btn-add {
    background: var(--green);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 8px 14px;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: background 0.15s, transform 0.15s;
}

    .btn-add:hover {
        background: #2E9449;
        transform: scale(1.04);
    }

.animal-list {
    max-height: 340px;
    overflow-y: auto;
    margin-bottom: 10px;
}

    .animal-list::-webkit-scrollbar {
        width: 4px;
    }

    .animal-list::-webkit-scrollbar-thumb {
        background: var(--gray-200);
        border-radius: 4px;
    }

.animal-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 4px;
    border-bottom: 1px solid var(--gray-100);
    transition: background 0.1s;
    border-radius: 6px;
}

    .animal-item:hover {
        background: var(--gray-50);
    }

.drag-handle {
    color: var(--gray-400);
    cursor: grab;
    font-size: 13px;
    padding: 0 2px;
}

.color-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.animal-thumb {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    object-fit: cover;
    background: var(--gray-100);
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.animal-name {
    flex: 1;
    font-size: 0.875rem;
    font-weight: 600;
}

.animal-actions {
    display: flex;
    gap: 4px;
}

.animal-action-btn {
    width: 24px;
    height: 24px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 13px;
    color: var(--gray-400);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.1s, background 0.1s;
}

    .animal-action-btn:hover {
        background: var(--gray-100);
        color: var(--gray-800);
    }

    .animal-action-btn.del:hover {
        color: #DC3545;
        background: #FFF5F5;
    }

.entries-footer {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    padding-top: 8px;
    border-top: 1px solid var(--gray-100);
}

.btn-sm {
    background: var(--gray-100);
    border: none;
    border-radius: 7px;
    padding: 6px 10px;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    color: var(--gray-700, #495057);
    transition: background 0.15s;
}

    .btn-sm:hover {
        background: var(--gray-200);
    }

    .btn-sm.danger:hover {
        background: #FFF5F5;
        color: #DC3545;
    }

/* RESULTS TAB */
.results-empty {
    text-align: center;
    padding: 2rem;
    color: var(--gray-400);
}

.result-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    border: 1px solid var(--gray-100);
    border-radius: 8px;
    margin-bottom: 6px;
}

.result-medal {
    font-size: 18px;
}

.result-name {
    font-weight: 700;
    font-size: 0.9rem;
    flex: 1;
}

.result-time {
    font-size: 0.75rem;
    color: var(--gray-400);
}

/* SETTINGS TAB */
.settings-group {
    margin-bottom: 1.2rem;
}

.settings-label {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--gray-600);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.6rem;
}

.setting-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.setting-name {
    font-size: 0.85rem;
    color: var(--gray-800);
}

.toggle {
    position: relative;
    width: 36px;
    height: 20px;
    background: var(--gray-200);
    border-radius: 20px;
    cursor: pointer;
    border: none;
    transition: background 0.2s;
}

    .toggle.on {
        background: var(--orange);
    }

    .toggle::after {
        content: '';
        position: absolute;
        top: 2px;
        left: 2px;
        width: 16px;
        height: 16px;
        background: white;
        border-radius: 50%;
        transition: transform 0.2s;
        box-shadow: 0 1px 3px rgba(0,0,0,0.2);
    }

    .toggle.on::after {
        transform: translateX(16px);
    }

input[type=range] {
    accent-color: var(--orange);
    width: 100px;
}

/* FEATURE CARDS */
.features {
    max-width: 1280px;
    margin: 0.5rem auto 0;
    padding: 0 1.5rem 1.5rem;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.feature-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 1.2rem;
    border: 1px solid var(--gray-200);
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: flex-start;
    gap: 14px;
    transition: box-shadow 0.2s, transform 0.2s;
}

    .feature-card:hover {
        box-shadow: var(--shadow-md);
        transform: translateY(-2px);
    }

.feature-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}

.fi-purple {
    background: #F3E8FF;
}

.fi-green {
    background: var(--green-light);
}

.fi-orange {
    background: #FFF3E0;
}

.fi-blue {
    background: #E8F4FF;
}

.feature-card h3 {
    font-family: var(--font-display);
    font-size: 0.95rem;
    font-weight: 800;
    margin-bottom: 4px;
}

.feature-card p {
    font-size: 0.82rem;
    color: var(--gray-600);
    line-height: 1.5;
}

.fc-purple h3 {
    color: #7C3AED;
}

.fc-green h3 {
    color: var(--green);
}

.fc-orange h3 {
    color: var(--orange);
}

.fc-blue h3 {
    color: #2563EB;
}

/* ANIMALS INCLUDED SECTION */
.section-animals-included {
    background: var(--white);
    padding: 3.5rem 0 2.5rem;
    border-top: 1px solid var(--gray-200);
    border-bottom: 1px solid var(--gray-200);
}

.ai-header {
    text-align: center;
    margin-bottom: 1.8rem;
}

.ai-badge {
    display: inline-block;
    background: #DCE9F5;
    color: #1D4ED8;
    border-radius: 20px;
    padding: 4px 16px;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 0.7rem;
}

.ai-title {
    font-family: var(--font-display);
    font-size: 1.7rem;
    font-weight: 900;
    color: var(--gray-800);
    margin-bottom: 0.4rem;
}

.ai-sub {
    color: var(--gray-600);
    font-size: 0.875rem;
    max-width: 520px;
    margin: 0 auto;
}

/* Filter tabs */
.ai-filter-row {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 1.8rem;
}

.ai-filter {
    background: var(--gray-100);
    border: 1.5px solid transparent;
    border-radius: 30px;
    padding: 7px 18px;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    color: var(--gray-600);
    transition: all 0.15s;
}

    .ai-filter:hover {
        background: #EFF6FF;
        color: #1D4ED8;
        border-color: #BFDBFE;
    }

    .ai-filter.active {
        background: var(--orange);
        color: #fff;
        border-color: var(--orange);
        box-shadow: 0 3px 10px rgba(255,122,0,0.3);
    }

/* Animal grid */
.ai-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 1rem;
    margin-bottom: 1.8rem;
}

.ai-card {
    background: var(--gray-50);
    border: 1.5px solid var(--gray-200);
    border-radius: 14px;
    padding: 1.1rem 0.8rem;
    text-align: center;
    cursor: pointer;
    transition: transform 0.18s, box-shadow 0.18s, border-color 0.18s, background 0.18s;
    position: relative;
    overflow: hidden;
}

    .ai-card:hover {
        transform: translateY(-4px) scale(1.03);
        box-shadow: 0 8px 24px rgba(0,0,0,0.12);
        border-color: var(--orange);
        background: #FFFBF5;
    }

    .ai-card.highlighted {
        border-color: var(--orange);
        background: #FFF3E0;
        box-shadow: 0 0 0 3px rgba(255,122,0,0.2);
    }

    .ai-card.hidden-card {
        opacity: 0.4;
    }

        .ai-card.hidden-card::after {
            content: '🙈';
            position: absolute;
            top: 6px;
            right: 8px;
            font-size: 13px;
        }

.ai-emoji {
    font-size: 2.6rem;
    display: block;
    margin-bottom: 6px;
    line-height: 1;
}

.ai-img {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 6px;
    display: block;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}

.ai-name {
    font-family: var(--font-display);
    font-size: 0.82rem;
    font-weight: 800;
    color: var(--gray-800);
    margin-bottom: 4px;
    line-height: 1.2;
}

.ai-habitat {
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--gray-400);
}

.ai-color-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    border-radius: 0 0 12px 12px;
}

.ai-spin-hint {
    font-size: 0.65rem;
    color: var(--orange);
    font-weight: 700;
    margin-top: 5px;
    opacity: 0;
    transition: opacity 0.15s;
}

.ai-card:hover .ai-spin-hint {
    opacity: 1;
}

/* Footer row */
.ai-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--gray-200);
}

.ai-footer-info {
    font-size: 0.83rem;
    color: var(--gray-600);
}

    .ai-footer-info span:first-child {
        font-weight: 700;
        color: var(--orange);
    }

.ai-add-btn {
    background: var(--orange);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 9px 22px;
    font-family: var(--font-display);
    font-size: 0.875rem;
    font-weight: 800;
    cursor: pointer;
    transition: background 0.15s, transform 0.15s;
    box-shadow: 0 3px 10px rgba(255,122,0,0.3);
}

    .ai-add-btn:hover {
        background: var(--orange-light);
        transform: translateY(-1px);
    }

/* HOW TO USE SECTION */
.section-howto {
    background: var(--white);
    padding: 3.5rem 0;
    border-top: 1px solid var(--gray-200);
    border-bottom: 1px solid var(--gray-200);
}

.howto-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.4rem;
    margin-top: 1.5rem;
}

.howto-step {
    background: var(--bg);
    border-radius: var(--radius);
    padding: 1.6rem 1.3rem;
    text-align: center;
    position: relative;
    border: 1px solid var(--gray-200);
    transition: transform 0.2s, box-shadow 0.2s;
}

    .howto-step:hover {
        transform: translateY(-4px);
        box-shadow: var(--shadow-md);
    }

.howto-num {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: var(--orange);
    color: #fff;
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.9rem;
    box-shadow: 0 4px 14px rgba(255,122,0,0.35);
}

.howto-icon {
    font-size: 2rem;
    margin-bottom: 0.6rem;
}

.howto-step h3 {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 800;
    margin-bottom: 0.4rem;
    color: var(--gray-800);
}

.howto-step p {
    font-size: 0.83rem;
    color: var(--gray-600);
    line-height: 1.6;
}

.howto-arrow {
    position: absolute;
    top: 50%;
    right: -28px;
    transform: translateY(-50%);
    font-size: 1.4rem;
    color: var(--gray-400);
    display: none;
}

@@media (min-width: 769px) {
    .howto-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .howto-step:not(:last-child) .howto-arrow {
        display: block;
    }
}

/* WHO USES THIS TOOL SECTION */
.section-whouses {
    padding: 3.5rem 0;
}

.whouses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.3rem;
    margin-top: 1.5rem;
}

.whouses-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 1.6rem;
    border: 1px solid var(--gray-200);
    box-shadow: var(--shadow-sm);
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    transition: transform 0.2s, box-shadow 0.2s;
}

    .whouses-card:hover {
        transform: translateY(-3px);
        box-shadow: var(--shadow-md);
    }

.whouses-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
}

.whouses-card h3 {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 800;
    margin-bottom: 0.35rem;
    color: var(--gray-800);
}

.whouses-card p {
    font-size: 0.83rem;
    color: var(--gray-600);
    line-height: 1.65;
}

/* EDUCATIONAL SECTION */
.section-edu {
    background: var(--white);
    padding: 3rem 0;
    border-top: 1px solid var(--gray-200);
    border-bottom: 1px solid var(--gray-200);
}

.section-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.section-title {
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 900;
    color: var(--gray-800);
    margin-bottom: 0.5rem;
    text-align: center;
}

.section-sub {
    text-align: center;
    color: var(--gray-600);
    margin-bottom: 2rem;
}

.edu-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.edu-card {
    background: linear-gradient(135deg, #FFF9F5, #FFF3E8);
    border: 1px solid #FFE0C0;
    border-radius: var(--radius);
    padding: 1.2rem;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: transform 0.2s, box-shadow 0.2s;
}

    .edu-card:hover {
        transform: translateY(-2px);
        box-shadow: var(--shadow-sm);
    }

.edu-icon {
    font-size: 28px;
}

.edu-card strong {
    font-size: 0.9rem;
    font-weight: 700;
    display: block;
    margin-bottom: 2px;
}

.edu-card span {
    font-size: 0.8rem;
    color: var(--gray-600);
}

/* ANIMAL CATEGORIES */
.section-cats {
    padding: 3rem 0;
}

.cats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.cat-card {
    background: var(--white);
    border-radius: var(--radius);
    border: 1px solid var(--gray-200);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: box-shadow 0.2s, transform 0.2s;
}

    .cat-card:hover {
        box-shadow: var(--shadow-md);
        transform: translateY(-3px);
    }

.cat-header {
    padding: 1rem 1rem 0.5rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

    .cat-header h3 {
        font-family: var(--font-display);
        font-size: 0.95rem;
        font-weight: 800;
    }

.cat-emoji {
    font-size: 20px;
}

.cat-animals {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    padding: 0 1rem 1rem;
}

.cat-pill {
    background: var(--gray-100);
    border-radius: 20px;
    padding: 3px 10px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--gray-700, #495057);
}

/* RELATED WHEELS */
.section-related {
    padding: 2rem 0 3rem;
}

.related-scroll {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    padding-bottom: 8px;
}

    .related-scroll::-webkit-scrollbar {
        height: 4px;
    }

    .related-scroll::-webkit-scrollbar-thumb {
        background: var(--gray-200);
        border-radius: 4px;
    }

.related-card {
    background: var(--white);
    border-radius: var(--radius);
    border: 1px solid var(--gray-200);
    box-shadow: var(--shadow-sm);
    min-width: 160px;
    padding: 1rem;
    text-align: center;
    cursor: pointer;
    transition: box-shadow 0.2s, transform 0.2s;
    flex-shrink: 0;
}

    .related-card:hover {
        box-shadow: var(--shadow-md);
        transform: translateY(-2px);
    }

.related-emoji {
    font-size: 36px;
    margin-bottom: 8px;
}

.related-card h4 {
    font-family: var(--font-display);
    font-size: 0.875rem;
    font-weight: 800;
}

/* SEO SECTION */
.section-seo {
    background: var(--white);
    padding: 3rem 0;
    border-top: 1px solid var(--gray-200);
}

.seo-content {
    max-width: 860px;
    margin: 0 auto;
}

    .seo-content h1 {
        font-family: var(--font-display);
        font-size: 2rem;
        font-weight: 900;
        color: var(--gray-800);
        margin-bottom: 0.5rem;
    }

    .seo-content h2 {
        font-family: var(--font-display);
        font-size: 1.3rem;
        font-weight: 800;
        color: var(--orange);
        margin: 1.8rem 0 0.7rem;
    }

    .seo-content p {
        line-height: 1.8;
        color: var(--gray-600);
        margin-bottom: 1rem;
        font-size: 0.95rem;
    }

    .seo-content ul {
        margin: 0.5rem 0 1rem 1.2rem;
    }

    .seo-content li {
        line-height: 1.8;
        color: var(--gray-600);
        font-size: 0.95rem;
    }

/* FAQ */
.faq-item {
    border-bottom: 1px solid var(--gray-200);
}

.faq-q {
    background: none;
    border: none;
    width: 100%;
    text-align: left;
    padding: 1rem 0;
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--gray-800);
}

.faq-a {
    padding: 0 0 1rem;
    color: var(--gray-600);
    font-size: 0.9rem;
    line-height: 1.7;
    display: none;
}

    .faq-a.open {
        display: block;
    }

.faq-arrow {
    transition: transform 0.2s;
}

    .faq-arrow.open {
        transform: rotate(180deg);
    }

/* FOOTER */
footer {
    background: var(--gray-800);
    color: #9CA3AF;
    padding: 2rem 1.5rem;
    text-align: center;
    font-size: 0.82rem;
}

    footer a {
        color: var(--orange);
        text-decoration: none;
    }

/* WINNER MODAL — fixed overlay over entire page in normal mode */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}

    .modal-overlay.show {
        display: flex;
    }

.modal-card {
    background: var(--white);
    border-radius: 24px;
    padding: 2.5rem 2rem;
    text-align: center;
    max-width: 380px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0,0,0,0.25);
    animation: modalPop 0.35s cubic-bezier(0.34,1.56,0.64,1);
    position: relative;
    overflow: hidden;
}

@@keyframes modalPop {
    from {
        transform: scale(0.7);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.winner-trophy {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.winner-label {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--orange);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 0.5rem;
}

.winner-animal-emoji {
    font-size: 5rem;
    margin: 0.5rem 0;
    animation: bounce 0.6s ease;
}

@@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(-15px);
    }

    60% {
        transform: translateY(-8px);
    }
}

.winner-name {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 900;
    color: var(--gray-800);
    margin-bottom: 1.5rem;
}

.modal-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

    .modal-actions .btn-spin {
        padding: 11px 24px;
        font-size: 0.9rem;
    }

.btn-outline {
    background: none;
    border: 1.5px solid var(--gray-200);
    border-radius: 10px;
    padding: 10px 20px;
    font-size: 0.875rem;
    font-weight: 700;
    cursor: pointer;
    color: var(--gray-700, #495057);
    transition: background 0.15s;
}

    .btn-outline:hover {
        background: var(--gray-100);
    }

/* CONFETTI — covers full page in normal mode */
#confetti-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 999;
}
/* In fullscreen, confetti fills the FS container */
#wheelFullscreenTarget:fullscreen #confetti-canvas,
#wheelFullscreenTarget:-webkit-full-screen #confetti-canvas,
#wheelFullscreenTarget:-moz-full-screen #confetti-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 150;
}

/* FULLSCREEN CONTAINER */
#wheelFullscreenTarget {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

    /* When the fullscreen target is the FS element */
    #wheelFullscreenTarget:fullscreen,
    #wheelFullscreenTarget:-webkit-full-screen,
    #wheelFullscreenTarget:-moz-full-screen,
    #wheelFullscreenTarget:-ms-fullscreen {
        background: #DCE9F5;
        width: 100vw;
        height: 100vh;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 1.5rem;
    }

        /* Canvas grows in fullscreen via JS */
        #wheelFullscreenTarget:fullscreen canvas#wheelCanvas,
        #wheelFullscreenTarget:-webkit-full-screen canvas#wheelCanvas {
            width: 80vmin !important;
            height: 80vmin !important;
        }

        /* Modal switches to absolute ONLY when fullscreen is active */
        #wheelFullscreenTarget:fullscreen .modal-overlay,
        #wheelFullscreenTarget:-webkit-full-screen .modal-overlay,
        #wheelFullscreenTarget:-moz-full-screen .modal-overlay,
        #wheelFullscreenTarget:-ms-fullscreen .modal-overlay {
            position: absolute;
            inset: 0;
            z-index: 200;
        }

/* Responsive */
@@media (max-width: 1024px) {
    .hero {
        grid-template-columns: 1fr;
    }

    .features {
        grid-template-columns: repeat(2, 1fr);
    }

    .cats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .edu-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .features {
        grid-template-columns: 1fr;
    }

    .cats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .wheel-wrapper {
        margin-left: 0;
    }

    .wheel-controls {
        margin-left: 0;
    }

    .floating-actions {
        position: relative;
        left: auto;
        top: auto;
        transform: none;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
    }
}


