/**
 * Spinner Wheel Styles
 * Wheel of Decision - Modern Redesign
 * Color Palette: Dark gray theme with amber accent
 */

:root {
    /* Brand Colors - Dark gray with amber */
    --brand-primary: #ffbe4d;
    --brand-secondary: #505152;
    --brand-accent: #1c1c1d;
    --brand-dark: #040405;

    /* Light Mode - Clean white/gray palette */
    --bg-main: #f5f5f5;
    --bg-sidebar: #ffffff;
    --bg-card: #ffffff;
    --bg-input: #f0f0f0;
    --text-primary: #040405;
    --text-secondary: #1c1c1d;
    --text-muted: #505152;
    --border-color: rgba(4, 4, 5, 0.1);
    --shadow-color: rgba(4, 4, 5, 0.08);
    --radius-sm: 4px;
    --radius-md: 6px;
    --radius-lg: 8px;
}

/* Dark Mode Variables */
.wod-app.dark-mode {
    --bg-main: #040405;
    --bg-sidebar: #1c1c1d;
    --bg-card: #1c1c1d;
    --bg-input: #505152;
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --text-muted: rgba(255, 255, 255, 0.5);
    --border-color: rgba(255, 255, 255, 0.1);
    --shadow-color: rgba(0, 0, 0, 0.4);
}

/* Main App Layout */
.wod-app {
    display: grid;
    grid-template-columns: 300px 1fr 300px;
    min-height: 100vh;
    background: var(--bg-main);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--text-primary);
    position: relative;
    transition: background 0.3s ease, color 0.3s ease;
}

/* Yes/No App - Same sidebar width as main app */
.wod-app.yes-no-app {
    grid-template-columns: 300px 1fr 300px;
}

.wod-app h1,
.wod-app h2,
.wod-app h3,
.wod-app h4 {
    font-family: 'Rubik', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Theme Toggle Button */
.theme-toggle {
    position: absolute;
    top: 68px;
    right: 20px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    cursor: pointer;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease, color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 2px 8px var(--shadow-color);
}

.theme-toggle:hover {
    background: var(--brand-primary);
    color: var(--brand-dark);
    transform: scale(1.1);
}

.theme-toggle svg {
    width: 20px;
    height: 20px;
}

/* Sidebars */
.sidebar {
    background: var(--bg-sidebar);
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    overflow-y: auto;
    max-height: 100vh;
    border-right: 1px solid var(--border-color);
    transition: background 0.3s ease, border-color 0.3s ease;
}

.sidebar-right {
    border-right: none;
    border-left: 1px solid var(--border-color);
}

.sidebar-section {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 20px;
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 8px var(--shadow-color);
    transition: all 0.3s ease;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(52, 52, 52, 0.15);
}

.wod-app.dark-mode .section-header {
    border-bottom-color: rgba(255, 255, 255, 0.15);
}

.section-header h3 {
    color: var(--text-primary);
    font-size: 15px;
    font-weight: 600;
    margin: 0;
    flex: 1;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.section-icon {
    font-size: 18px;
    opacity: 0.8;
}

.entry-count {
    background: var(--brand-primary);
    color: var(--brand-dark);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
}

/* Results Section */
.results-list {
    max-height: 280px;
    overflow-y: auto;
    margin-bottom: 12px;
}

.results-list::-webkit-scrollbar {
    width: 4px;
}

.results-list::-webkit-scrollbar-thumb {
    background: var(--brand-primary);
    border-radius: 2px;
}

.no-results {
    color: var(--text-secondary);
    font-size: 13px;
    text-align: center;
    padding: 30px 20px;
    font-style: italic;
}

.result-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--bg-input);
    border-radius: var(--radius-sm);
    margin-bottom: 8px;
    animation: slideIn 0.3s ease;
    transition: background 0.2s ease;
}

.result-item:hover {
    background: rgba(255, 184, 76, 0.1);
}

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

.result-item .result-number {
    background: var(--brand-primary);
    color: var(--brand-dark);
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    flex-shrink: 0;
}

.result-item .result-name {
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.result-item .result-time {
    color: var(--text-muted);
    font-size: 11px;
}

.btn-clear {
    width: 100%;
    padding: 10px;
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s;
}

.btn-clear:hover {
    background: rgba(255, 184, 76, 0.1);
    border-color: var(--brand-primary);
    color: var(--brand-primary);
}

/* Stats Section */
.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.stat-item {
    text-align: center;
    padding: 16px 12px;
    background: var(--bg-input);
    border-radius: var(--radius-sm);
    transition: all 0.2s;
}

.stat-item:hover {
    background: rgba(255, 184, 76, 0.1);
}

.stat-value {
    display: block;
    font-size: 28px;
    font-weight: 700;
    color: var(--brand-primary);
    margin-bottom: 4px;
}

.stat-label {
    color: var(--text-muted);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

/* Main Wheel Area */
.wheel-main {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    position: relative;
    background: var(--bg-main);
}

.wheel-title {
    text-align: center;
    margin-bottom: 32px;
}

.wheel-title h1 {
    color: var(--text-primary);
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 8px 0;
    letter-spacing: -0.5px;
}

.wheel-title p {
    color: var(--text-secondary);
    font-size: 15px;
    margin: 0;
}

/* Wheel Structure */
.wheel-wrapper {
    position: relative;
    width: 420px;
    height: 420px;
}

.canvas-container {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

#wheelCanvas {
    display: block;
    filter: drop-shadow(0 8px 32px var(--shadow-color));
}

/* Pointer - Slim yellow arrow with dark border */
.wheel-pointer {
    position: absolute;
    top: 50%;
    right: -5px;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-top: 12px solid transparent;
    border-bottom: 12px solid transparent;
    border-right: 28px solid var(--brand-dark);
    z-index: 15;
    filter: drop-shadow(-2px 0 4px rgba(0,0,0,0.2));
}

.wheel-pointer::after {
    content: '';
    position: absolute;
    top: 50%;
    right: -26px;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
    border-right: 22px solid var(--brand-primary);
}

/* Spin Button - Teal themed */
.spin-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90px;
    height: 90px;
    background: var(--brand-dark);
    border-radius: 50%;
    border: none;
    color: #ffffff;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    z-index: 20;
    box-shadow: 0 4px 20px rgba(4, 4, 5, 0.4);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    letter-spacing: 2px;
}

.spin-button:hover {
    transform: translate(-50%, -50%) scale(1.08);
    box-shadow: 0 6px 30px rgba(4, 4, 5, 0.5);
}

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

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

.spin-text {
    font-size: 13px;
    letter-spacing: 3px;
}

.spin-icon {
    display: none;
}

/* Wheel Controls - Icon buttons with tooltips */
.wheel-controls {
    display: flex;
    gap: 12px;
    margin-top: 32px;
}

.control-btn {
    position: relative;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    transition: all 0.2s;
    box-shadow: 0 2px 8px var(--shadow-color);
}

.control-btn:hover {
    background: var(--brand-primary);
    color: var(--brand-dark);
    border-color: var(--brand-primary);
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(255, 184, 76, 0.3);
}

/* Tooltip */
.control-btn::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: -36px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-card);
    color: var(--text-primary);
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    font-size: 11px;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s;
    pointer-events: none;
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 8px var(--shadow-color);
}

.control-btn:hover::after {
    opacity: 1;
    visibility: visible;
    bottom: -40px;
}

/* Entries Section */
.entries-section textarea {
    width: 100%;
    height: 180px;
    padding: 14px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 14px;
    resize: vertical;
    font-family: inherit;
    transition: all 0.2s;
    background: var(--bg-input);
    color: var(--text-primary);
    line-height: 1.6;
    scrollbar-width: thin;
    scrollbar-color: var(--brand-primary) var(--bg-input);
}

.entries-section textarea::-webkit-scrollbar {
    width: 8px;
}

.entries-section textarea::-webkit-scrollbar-track {
    background: var(--bg-input);
    border-radius: 4px;
}

.entries-section textarea::-webkit-scrollbar-thumb {
    background: var(--brand-primary);
    border-radius: 4px;
}

.entries-section textarea::-webkit-scrollbar-thumb:hover {
    background: #e5a544;
}

.entries-section textarea:focus {
    outline: none;
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 3px rgba(255, 184, 76, 0.15);
}

.btn-primary {
    width: 100%;
    padding: 14px 20px;
    background: var(--brand-primary);
    color: var(--brand-dark);
    border: none;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 12px;
    letter-spacing: 0.3px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 184, 76, 0.35);
}

/* Settings Section */

.range-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
}

.range-wrapper input[type="range"] {
    flex: 1;
    height: 6px;
    border-radius: 3px;
    background: var(--bg-input);
    appearance: none;
    cursor: pointer;
}

.range-wrapper input[type="range"]::-webkit-slider-thumb {
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--brand-primary);
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(255, 184, 76, 0.4);
    transition: transform 0.2s;
}

.range-wrapper input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.range-value {
    color: var(--brand-primary);
    font-weight: 600;
    min-width: 30px;
    font-size: 14px;
}

/* Toggle Button */
.toggle-button {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
}

.toggle-button:hover {
    border-color: var(--brand-primary);
    color: var(--text-primary);
}

.toggle-button.active {
    background: var(--brand-primary);
    border-color: var(--brand-primary);
    color: var(--brand-dark);
}

.setting-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.setting-item:last-child {
    margin-bottom: 0;
}

.setting-item > label:first-child {
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    flex: 1;
}

/* Enhanced Settings Layout */
.settings-compact {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Setting Item Card Style */
.setting-item {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    background: var(--bg-input);
    border-radius: var(--radius-md);
    padding: 16px;
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
}

.setting-item:hover {
    border-color: rgba(255, 190, 77, 0.3);
    box-shadow: 0 4px 12px rgba(255, 190, 77, 0.1);
}

.setting-item-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.setting-item-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--brand-primary) 0%, #ffa726 100%);
    border-radius: 8px;
    color: var(--brand-dark);
}

.setting-item-icon svg {
    width: 16px;
    height: 16px;
}

.setting-item-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Settings Layout */
.settings-layout {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Duration Section - Grid layout */
.duration-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.duration-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--bg-input);
    border-radius: var(--radius-md);
    padding: 20px;
    border: 1px solid var(--border-color);
    grid-row: span 2;
}

.duration-number {
    font-size: 48px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
}

.duration-unit {
    font-size: 16px;
    color: var(--text-muted);
    font-weight: 500;
    margin-top: 4px;
}

/* Duration Controls - Stacked +/- buttons */
.duration-controls {
    display: contents;
}

.duration-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 16px;
}

.duration-btn:hover {
    background: var(--brand-primary);
    border-color: var(--brand-primary);
    color: var(--brand-dark);
}

.duration-btn:active {
    transform: scale(0.97);
}

/* Toggles Row */
.toggles-row {
    display: flex;
    gap: 12px;
}

/* Toggle Items with Icons */
.setting-toggle-item {
    flex: 1;
    background: var(--bg-input);
    border-radius: var(--radius-md);
    padding: 14px;
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.setting-toggle-item:hover {
    border-color: rgba(255, 190, 77, 0.3);
    background: var(--bg-main);
}

.setting-toggle-item.active {
    border-color: var(--brand-primary);
    background: rgba(255, 190, 77, 0.1);
}

.setting-toggle-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-main);
    border-radius: 50%;
    color: var(--text-muted);
    transition: all 0.2s;
}

.setting-toggle-item:hover .setting-toggle-icon {
    color: var(--text-primary);
}

.setting-toggle-item.active .setting-toggle-icon {
    background: linear-gradient(135deg, var(--brand-primary) 0%, #ffa726 100%);
    color: var(--brand-dark);
    box-shadow: 0 4px 12px rgba(255, 190, 77, 0.3);
}

.setting-toggle-icon svg {
    width: 20px;
    height: 20px;
}

.setting-toggle-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    transition: color 0.2s;
}

.setting-toggle-item:hover .setting-toggle-label {
    color: var(--text-secondary);
}

.setting-toggle-item.active .setting-toggle-label {
    color: var(--brand-primary);
}

/* Dark mode adjustments */
.dark-mode .setting-toggle-item.active {
    background: rgba(255, 190, 77, 0.08);
}

/* Result Modal */
.result-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(52, 52, 52, 0.85);
    backdrop-filter: blur(8px);
    align-items: center;
    justify-content: center;
    z-index: 10001;
}

.result-modal.show {
    display: flex;
}

.result-content {
    background: var(--bg-card);
    padding: 50px 60px;
    border-radius: var(--radius-md);
    text-align: center;
    border: 1px solid var(--brand-primary);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.4);
    animation: modalPop 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    max-width: 90%;
}

@keyframes modalPop {
    from {
        transform: scale(0.8) translateY(20px);
        opacity: 0;
    }
    to {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

.result-decoration {
    margin-bottom: 16px;
    animation: bounce 0.6s ease infinite alternate;
    color: var(--brand-primary);
}

.result-decoration svg {
    width: 56px;
    height: 56px;
}

@keyframes bounce {
    from { transform: translateY(0); }
    to { transform: translateY(-8px); }
}

.result-content h2 {
    font-size: 38px;
    margin: 0 0 8px 0;
    color: var(--brand-primary);
}

.result-subtitle {
    color: var(--text-secondary);
    font-size: 16px;
    margin: 0 0 28px 0;
}

.result-content .btn-primary {
    width: auto;
    padding: 14px 36px;
    margin: 0;
}

/* Mobile Toggles - Stacked under tools menu */
.mobile-toggles {
    display: none;
    position: absolute;
    top: 164px;
    right: 20px;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    z-index: 100;
}

.mobile-toggle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    cursor: pointer;
    box-shadow: 0 2px 8px var(--shadow-color);
    transition: background 0.3s ease, color 0.3s ease, transform 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-toggle:hover {
    background: var(--brand-primary);
    color: var(--brand-dark);
    transform: scale(1.05);
}

.mobile-toggle svg {
    width: 20px;
    height: 20px;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .wod-app {
        grid-template-columns: 260px 1fr 260px;
    }

    .wod-app.yes-no-app {
        grid-template-columns: 260px 1fr 260px;
    }

    .wheel-wrapper {
        width: 380px;
        height: 380px;
    }
}

@media (max-width: 992px) {
    .wod-app {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
    }

    .sidebar {
        display: none;
        position: fixed;
        top: 0;
        bottom: 0;
        width: 300px;
        z-index: 500;
        max-height: 100vh;
        box-shadow: 0 0 30px rgba(0, 0, 0, 0.2);
    }

    .sidebar-left,
    .sidebar-right {
        left: 0;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }

    .sidebar-left.open,
    .sidebar-right.open {
        transform: translateX(0);
        display: flex;
    }

    .mobile-toggles {
        display: flex;
    }

    .wheel-wrapper {
        width: 340px;
        height: 340px;
    }

    .spin-button {
        width: 80px;
        height: 80px;
    }

    /* Mobile - switch all controls to fixed positioning */
    .hamburger-menu,
    .theme-toggle,
    .tools-menu-wrapper,
    .mobile-toggles {
        position: fixed;
    }
}

@media (max-width: 480px) {
    .wheel-wrapper {
        width: 280px;
        height: 280px;
    }

    .wheel-title h1 {
        font-size: 22px;
    }

    .spin-button {
        width: 70px;
        height: 70px;
        font-size: 11px;
    }

    .wheel-controls {
        flex-wrap: wrap;
        justify-content: center;
    }

    .control-btn {
        width: 44px;
        height: 44px;
        font-size: 18px;
    }

    .result-content {
        padding: 36px 28px;
    }

    .result-content h2 {
        font-size: 28px;
    }

    .result-decoration {
        font-size: 44px;
    }
}

/* Overlay for mobile sidebars */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: 400;
}

.sidebar-overlay.show {
    display: block;
}

/* Fullscreen Wheel Mode */
.wod-app.fullscreen-mode {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9999;
    background: var(--bg-main);
}

.wod-app.fullscreen-mode .sidebar,
.wod-app.fullscreen-mode .theme-toggle,
.wod-app.fullscreen-mode .hamburger-menu,
.wod-app.fullscreen-mode .tools-menu-wrapper {
    display: none !important;
}

/* Show mobile toggles in fullscreen for quick access */
.wod-app.fullscreen-mode .mobile-toggles {
    display: flex;
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
}

.wod-app.fullscreen-mode .wheel-main {
    width: 100%;
    height: 100%;
    padding: 40px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.wod-app.fullscreen-mode .wheel-wrapper {
    width: 500px;
    height: 500px;
}

.wod-app.fullscreen-mode .wheel-title h1 {
    font-size: 36px;
}

.wod-app.fullscreen-mode .wheel-title p {
    font-size: 18px;
}

.wod-app.fullscreen-mode .wheel-controls {
    margin-top: 40px;
}

.wod-app.fullscreen-mode .control-btn {
    width: 56px;
    height: 56px;
}

.wod-app.fullscreen-mode .control-btn svg {
    width: 24px;
    height: 24px;
}

/* Exit fullscreen button - hidden, using icon swap instead */
.fullscreen-exit {
    display: none !important;
}

@media (max-height: 700px) {
    .wod-app.fullscreen-mode .wheel-wrapper {
        width: 380px;
        height: 380px;
    }

    .wod-app.fullscreen-mode .wheel-title h1 {
        font-size: 28px;
    }

    .wod-app.fullscreen-mode .wheel-title {
        margin-bottom: 20px;
    }

    .wod-app.fullscreen-mode .wheel-controls {
        margin-top: 24px;
    }
}

/* ================================================
   Hamburger Menu & Navigation Overlay
   ================================================ */

/* Hamburger Menu Button */
.hamburger-menu {
    position: absolute;
    top: 20px;
    right: 20px;
    left: auto;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    cursor: pointer;
    z-index: 1001;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease, color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 2px 8px var(--shadow-color);
}

.hamburger-menu:hover {
    background: var(--brand-primary);
    color: var(--brand-dark);
    transform: scale(1.1);
}

.hamburger-menu svg {
    width: 20px;
    height: 20px;
}

/* Fullscreen Navigation Overlay */
.nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--brand-dark);
    z-index: 10002;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-overlay.show {
    opacity: 1;
    visibility: visible;
}

/* Close Button */
.nav-close {
    position: absolute;
    top: 30px;
    right: 30px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.nav-close:hover {
    background: var(--brand-primary);
    border-color: var(--brand-primary);
    color: var(--brand-dark);
    transform: rotate(90deg);
}

/* Navigation Menu */
.nav-menu {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.nav-link {
    font-family: 'Rubik', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 48px;
    font-weight: 600;
    color: #fff;
    text-decoration: none;
    position: relative;
    padding: 10px 20px;
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateY(30px);
}

.nav-overlay.show .nav-link {
    opacity: 1;
    transform: translateY(0);
}

.nav-overlay.show .nav-link:nth-child(1) { transition-delay: 0.1s; }
.nav-overlay.show .nav-link:nth-child(2) { transition-delay: 0.15s; }
.nav-overlay.show .nav-link:nth-child(3) { transition-delay: 0.2s; }
.nav-overlay.show .nav-link:nth-child(4) { transition-delay: 0.25s; }

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 5px;
    left: 20px;
    right: 20px;
    height: 4px;
    background: var(--brand-primary);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s ease;
}

.nav-link:hover {
    color: var(--brand-primary);
}

.nav-link:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

/* Responsive adjustments for navigation overlay */
@media (max-width: 768px) {
    .nav-link {
        font-size: 32px;
    }

    .nav-close {
        top: 20px;
        right: 20px;
        width: 48px;
        height: 48px;
    }
}

/* ================================================
   Tools Menu Dropdown
   ================================================ */

.tools-menu-wrapper {
    position: absolute;
    top: 116px;
    right: 20px;
    z-index: 1000;
}

.tools-toggle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px var(--shadow-color);
}

.tools-toggle:hover,
.tools-toggle.active {
    background: var(--brand-primary);
    color: var(--brand-dark);
    transform: scale(1.1);
}

.tools-toggle svg {
    width: 20px;
    height: 20px;
}

.tools-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: 0 8px 24px var(--shadow-color);
    min-width: 180px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
}

.tools-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.tools-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.tools-item:first-child {
    border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.tools-item:last-child {
    border-radius: 0 0 var(--radius-md) var(--radius-md);
}

.tools-item:hover {
    background: var(--brand-primary);
    color: var(--brand-dark);
}

.tools-item svg {
    flex-shrink: 0;
}

/* ================================================
   Match Up Styles
   ================================================ */

/* Match Up Container */
.match-up-main {
    justify-content: flex-start;
    padding-top: 60px;
}

.match-up-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
    margin: 40px 0;
}

/* Match Up Slots */
.match-up-slot {
    width: 280px;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 2px solid var(--border-color);
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px var(--shadow-color);
}

.match-up-slot:hover {
    border-color: rgba(255, 190, 77, 0.3);
}

.match-up-slot.spinning {
    border-color: var(--brand-primary);
    box-shadow: 0 0 30px rgba(255, 190, 77, 0.3);
}

.match-up-slot.winner {
    border-color: var(--brand-primary);
    animation: slotWin 0.5s ease;
}

@keyframes slotWin {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}

.slot-header {
    background: linear-gradient(135deg, #4a5568 0%, #2d3748 100%);
    color: #81e6d9;
    text-align: center;
    padding: 12px 20px;
    font-size: 16px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.dark-mode .slot-header {
    background: linear-gradient(135deg, #3d4a5c 0%, #1a202c 100%);
}

.slot-display {
    height: 200px;
    background: var(--bg-input);
    overflow: hidden;
    position: relative;
}

/* Slot machine fade edges */
.slot-display::before,
.slot-display::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    height: 50px;
    z-index: 2;
    pointer-events: none;
}

.slot-display::before {
    top: 0;
    background: linear-gradient(to bottom, var(--bg-input) 0%, transparent 100%);
}

.slot-display::after {
    bottom: 0;
    background: linear-gradient(to top, var(--bg-input) 0%, transparent 100%);
}

.slot-reel {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    will-change: transform;
    transform: translateY(50px);
    width: 100%;
}

.slot-item {
    font-size: 48px;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 20px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 260px;
    height: 100px;
    min-height: 100px;
    flex-shrink: 0;
    box-sizing: border-box;
}

/* VS Divider */
.match-up-vs {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background: var(--brand-primary);
    border-radius: 50%;
    color: var(--brand-dark);
    font-size: 18px;
    font-weight: 800;
    box-shadow: 0 4px 15px rgba(255, 190, 77, 0.4);
}

/* Match Up Spin Button */
.match-up-app .spin-button {
    position: relative;
    top: auto;
    left: auto;
    transform: none;
    margin-top: 40px;
    width: 140px;
    height: 140px;
    background: var(--brand-primary);
    color: var(--brand-dark);
    font-size: 18px;
    font-weight: 800;
    letter-spacing: 4px;
    box-shadow: 0 8px 30px rgba(255, 190, 77, 0.5), 0 0 0 4px rgba(255, 190, 77, 0.2);
    border: 3px solid rgba(255, 255, 255, 0.2);
}

.match-up-app .spin-button:hover {
    transform: scale(1.1);
    box-shadow: 0 12px 40px rgba(255, 190, 77, 0.6), 0 0 0 6px rgba(255, 190, 77, 0.3);
}

.match-up-app .spin-button:active {
    transform: scale(0.95);
}

.match-up-app .spin-button:disabled {
    background: var(--bg-input);
    color: var(--text-muted);
    box-shadow: none;
    cursor: not-allowed;
}

/* Match Up Result Modal */
.match-up-result .match-result-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin: 24px 0;
}

.match-up-result .match-item {
    background: var(--bg-input);
    padding: 16px 24px;
    border-radius: var(--radius-md);
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    border: 2px solid var(--brand-primary);
}

.match-up-result .match-vs {
    font-size: 28px;
    font-weight: 800;
    color: var(--brand-primary);
}

/* Match Up Entries - Make textareas shorter */
.match-up-app .entries-section textarea {
    height: 120px;
}

/* Match Up Statistics - Stacked layout for last match */
.match-up-app .stats-grid {
    grid-template-columns: 1fr;
    gap: 12px;
}

.match-up-app .stat-item {
    padding: 16px;
}

.match-up-app .stat-value {
    font-size: 22px;
    word-break: break-word;
    line-height: 1.3;
}

/* Match Up Results List - Show full names */
.match-up-app .result-item {
    flex-wrap: wrap;
    gap: 8px;
}

.match-up-app .result-item .result-name {
    white-space: normal;
    word-break: break-word;
    line-height: 1.4;
    flex: 1 1 100%;
    order: 2;
    margin-top: 4px;
}

.match-up-app .result-item .result-number {
    order: 1;
}

.match-up-app .result-item .result-time {
    order: 1;
    margin-left: auto;
}

/* Match Up Fullscreen Mode */
.match-up-app.fullscreen-mode .match-up-container {
    transform: scale(1.1);
}

.match-up-app.fullscreen-mode .match-up-slot {
    width: 320px;
}

.match-up-app.fullscreen-mode .slot-display {
    height: 240px;
}

.match-up-app.fullscreen-mode .slot-item {
    font-size: 56px;
}

/* Responsive Match Up */
@media (max-width: 992px) {
    .match-up-container {
        flex-direction: column;
        gap: 20px;
    }

    .match-up-slot {
        width: 100%;
        max-width: 320px;
    }

    .match-up-vs {
        width: 50px;
        height: 50px;
        font-size: 16px;
    }

    .match-up-app .spin-button {
        width: 100px;
        height: 100px;
    }
}

@media (max-width: 480px) {
    .match-up-slot {
        width: 100%;
        max-width: 280px;
    }

    .slot-display {
        height: 160px;
    }

    .slot-item {
        font-size: 36px;
    }

    .match-up-result .match-result-display {
        flex-direction: column;
        gap: 12px;
    }

    .match-up-result .match-item {
        font-size: 20px;
        padding: 12px 20px;
    }
}
