/**
 * 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;

    /* Layout */
    --sidebar-width: 300px;
    --menu-offset: 20px;

    /* 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: 18px;
    --radius-md: 20px;
    --radius-lg: 22px;
}

/* Dark Mode Variables */
body.dark-mode {
    --bg-main: #0a0a0b;
    --bg-sidebar: #1c1c1d;
    --bg-card: #1c1c1d;
    --bg-input: #141421;
    --text-primary: #f5f5f5;
    --text-secondary: rgba(255, 255, 255, 0.8);
    --text-muted: rgba(255, 255, 255, 0.5);
    --border-color: rgba(255, 255, 255, 0.05);
    --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;
}

/* Wheel Controls Container - positioned absolutely, doesn't affect grid */
/* Hidden on desktop (nav CTA buttons handle tools/theme), visible on mobile only */
.wheel-controls-container {
    position: absolute;
    top: 0;
    right: 0;
    z-index: 1000;
    pointer-events: none;
    display: none;
}

/* Show wheel controls container only on mobile/tablet */
@media (max-width: 1024px) {
    .wheel-controls-container {
        display: block;
    }
}

/* 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: calc(var(--sidebar-width) + var(--menu-offset));
    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);
    pointer-events: auto;
}

.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-main); */
    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);
}

body.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;
}

/* Result Item with Images */
.result-item.result-item-images {
    flex-wrap: wrap;
}

.result-images {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
}

.result-thumb {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    border: 1px solid var(--border-color);
}

.result-plus {
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 600;
}

/* Last Match Images */
.last-match-images {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.last-match-img {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    border: 1px solid var(--border-color);
}

.last-match-plus {
    color: var(--brand-primary);
    font-size: 16px;
    font-weight: 700;
}

.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;
    gap: 12px;
}

.stat-item {
    text-align: center;
    padding: 16px 12px;
    background: var(--bg-input);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    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;
    background: transparent !important;
}

#wheelCanvas {
    display: block;
    /* filter: drop-shadow(0 8px 32px var(--shadow-color)); */
    background: transparent !important;
}

/* 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;
    justify-content: center;
}

.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 {
    /* No hover effect */
}

/* 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);
}

/* Winning Label Input */
.winning-label-group {
    margin-bottom: 4px;
}

.winning-label-group .setting-label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.winning-label-group .setting-input {
    width: 100%;
    padding: 10px 12px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 13px;
    transition: all 0.2s ease;
}

.winning-label-group .setting-input:focus {
    outline: none;
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 2px rgba(255, 190, 77, 0.15);
}

.winning-label-group .setting-input::placeholder {
    color: var(--text-muted);
}

/* Toggles Row */
.toggles-row,
.setting-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;
}

/* Panel Toggles - Unified wheel controls (Results/Settings buttons) */
/* These are inside .wheel-controls-container for unified management */
.panel-toggles,
.mobile-toggles {
    display: none;
    position: absolute;
    top: 164px;
    right: 20px;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    z-index: 100;
    pointer-events: auto;
}

.panel-toggle,
.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;
    pointer-events: auto;
}

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

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

/* Wheel */
.wheel {
    display: flex;
    justify-content: space-evenly;
    width: 100%;
}

.wheel-left,
.wheel-right {
    /* height: 100%; */
    padding: 0 70px;
}

.ad-placeholder-top,
.ad-placeholder-bottom {
    width: 100%;
    height: 120px;
    background: yellow;
    margin-bottom: 20px;
}

.ad-placeholder-bottom {
    margin-top: 20px;
}

/* Responsive Design */
@media (max-width: 1200px) {
    :root {
        --sidebar-width: 260px;
    }

    .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: 1200px) {

    .wod-app,
    .wod-app.yes-no-app,
    .wod-app.image-wheel-app,
    .wod-app.match-up-app {
        grid-template-columns: 1fr !important;
        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;
        width: 100%;
        padding-top: 100px;
        padding-right: 100px;
    }

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

    .panel-toggles,
    .mobile-toggles {
        display: flex;
    }

    /* Hide panel toggles in shared wheel view */
    .wod-app.shared-wheel-view .panel-toggles,
    .wod-app.shared-wheel-view .mobile-toggles {
        display: none !important;
    }

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

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

    /* Center the wheel content in mobile */
    .wheel-main {
        display: flex;
        flex-direction: column;
        align-items: center;
        /* justify-content: center; */
        min-height: 100vh;
        padding: 0 20px 40px 20px;
    }

    /* Mobile - container doesn't need to be positioned */
    .wheel-controls-container {
        position: static;
        pointer-events: none;
    }

    /* Mobile - all controls fixed on right side, stacked vertically */
    .hamburger-menu {
        position: fixed !important;
        top: 20px !important;
        right: 20px !important;
        left: auto !important;
        bottom: auto !important;
        z-index: 9990 !important;
    }

    .tools-menu-wrapper {
        position: fixed !important;
        top: 70px !important;
        right: 20px !important;
        left: auto !important;
        bottom: auto !important;
        z-index: 9999 !important;
    }

    .theme-toggle {
        position: fixed !important;
        top: 120px !important;
        right: 20px !important;
        left: auto !important;
        bottom: auto !important;
        z-index: 9980 !important;
    }

    /* Panel toggles - stack vertically on right side below other controls */
    .panel-toggles,
    .mobile-toggles {
        position: fixed !important;
        top: 170px !important;
        right: 20px !important;
        left: auto !important;
        bottom: auto !important;
        transform: none !important;
        flex-direction: column;
        gap: 10px;
        z-index: 9970 !important;
    }

    /* Hide panel toggles in shared wheel view */
    .wod-app.shared-wheel-view .panel-toggles,
    .wod-app.shared-wheel-view .mobile-toggles {
        display: none !important;
    }
}

@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 panel toggles in fullscreen for quick access */
.wod-app.fullscreen-mode .panel-toggles,
.wod-app.fullscreen-mode .mobile-toggles {
    display: flex;
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
}

/* Hide panel toggles in shared wheel view even in fullscreen */
.wod-app.fullscreen-mode.shared-wheel-view .panel-toggles,
.wod-app.fullscreen-mode.shared-wheel-view .mobile-toggles {
    display: none !important;
}

.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: min(80vw, 70vh);
    height: min(80vw, 70vh);
    max-width: 800px;
    max-height: 800px;
}

.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: min(85vw, 65vh);
        height: min(85vw, 65vh);
    }

    .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;
    }
}

/* Responsive fullscreen for smaller screens */
@media (max-width: 768px) {
    .wod-app.fullscreen-mode .wheel-wrapper {
        width: min(90vw, 70vh);
        height: min(90vw, 70vh);
    }
}

@media (max-width: 576px) {
    .wod-app.fullscreen-mode .wheel-main {
        padding: 20px 15px;
    }

    .wod-app.fullscreen-mode .wheel-wrapper {
        width: min(95vw, 65vh);
        height: min(95vw, 65vh);
    }
}

/* Landscape orientation in fullscreen */
@media (max-height: 500px) and (orientation: landscape) {
    .wod-app.fullscreen-mode .wheel-wrapper {
        width: min(70vw, 75vh);
        height: min(70vw, 75vh);
    }

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

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

/* Hamburger Menu Button */
.hamburger-menu {
    position: absolute;
    top: 20px;
    right: calc(var(--sidebar-width) + var(--menu-offset));
    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);
    pointer-events: auto;
}

.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: left;
    gap: 16px;
}

.nav-link {
    font-family: 'Rubik', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 23px;
    font-weight: 600;
    color: #fff;
    text-decoration: none;
    position: relative;
    padding: 6px 12px;
    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-overlay.show .nav-link:nth-child(5) {
    transition-delay: 0.3s;
}

.nav-overlay.show .nav-link:nth-child(6) {
    transition-delay: 0.35s;
}

.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;
}

/* Legal links in navigation overlay */
.nav-legal-links {
    display: flex;
    gap: 24px;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.4s ease;
}

.nav-overlay.show .nav-legal-links {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.4s;
}

.nav-link.nav-link-small {
    font-size: 16px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.6);
    padding: 4px 8px;
    opacity: 1;
    transform: none;
}

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

.nav-link.nav-link-small::after {
    height: 2px;
    bottom: 2px;
    left: 8px;
    right: 8px;
}

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

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

    .nav-legal-links {
        flex-direction: column;
        gap: 12px;
        align-items: center;
    }

    .nav-link.nav-link-small {
        font-size: 13px;
    }
}

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

.tools-menu-wrapper {
    position: absolute;
    top: 116px;
    right: calc(var(--sidebar-width) + var(--menu-offset));
    z-index: 1000;
    pointer-events: auto;
}

.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: 0;
    right: calc(100% + 10px);
    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: translateX(10px);
    transition: all 0.2s ease;
    z-index: 10000;
}

.tools-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
    z-index: 10000;
}

.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;
    position: relative;
}

/* 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;
    width: 100%;
    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: 1200px) {
    .match-up-container {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 12px;
    }

    .match-up-slot {
        width: calc(50% - 30px);
        max-width: 200px;
        min-width: 140px;
    }

    .slot-header {
        padding: 8px 12px;
        font-size: 12px;
    }

    .slot-display {
        height: 100px;
    }

    .slot-item {
        font-size: 28px;
        height: 50px;
        line-height: 50px;
    }

    .match-up-vs {
        width: 40px;
        height: 40px;
        font-size: 14px;
        position: absolute;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
        z-index: 10;
    }

    .match-up-app .spin-button {
        width: 80px;
        height: 80px;
        font-size: 14px;
    }

    .match-up-app .wheel-main {
        padding-top: 60px;
    }
}

@media (max-width: 480px) {
    .match-up-slot {
        width: calc(50% - 25px);
        max-width: 160px;
        min-width: 120px;
    }

    .slot-header {
        padding: 6px 10px;
        font-size: 11px;
    }

    .slot-display {
        height: 80px;
    }

    .slot-item {
        font-size: 22px;
        height: 40px;
        line-height: 40px;
    }

    .match-up-vs {
        width: 36px;
        height: 36px;
        font-size: 12px;
    }

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

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

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

/* ================================================
   Match Up Image Mode Styles
   ================================================ */

/* Mode Toggle Section */
.mode-section {
    padding: 12px 16px !important;
}

.mode-toggle-wrapper {
    display: flex;
    gap: 8px;
    background: var(--bg-input);
    border-radius: var(--radius-md);
    padding: 4px;
}

.mode-toggle-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    background: transparent;
    border: none;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.mode-toggle-btn:hover {
    color: var(--text-primary);
    background: rgba(255, 190, 77, 0.1);
}

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

.mode-toggle-btn svg {
    width: 18px;
    height: 18px;
}

/* Image Upload Area - Add Image Button Style */
.add-image-section {
    text-align: center;
    margin-bottom: 8px;
}

.hidden-input {
    display: none !important;
}

.btn-add-image {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 14px 20px;
    background: var(--bg-input);
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-add-image:hover {
    border-color: var(--brand-primary);
    color: var(--brand-primary);
    background: rgba(255, 190, 77, 0.1);
}

.btn-add-image svg {
    flex-shrink: 0;
}

.add-image-hint {
    color: var(--text-muted);
    font-size: 11px;
    margin-top: 8px;
    margin-bottom: 0;
}

/* Image Preview Grid */
.image-preview-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-top: 12px;
}

.image-preview-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--bg-input);
}

.image-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-remove-btn {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    border: none;
    color: white;
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.image-preview-item:hover .image-remove-btn {
    opacity: 1;
}

.image-remove-btn:hover {
    background: var(--error-color, #dc3545);
}

/* Slot Item Image */
.slot-item-image {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    padding: 0;
}

.slot-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0;
}

/* When showing images, remove the transform offset from slot-reel */
.slot-reel:has(.slot-item-image) {
    transform: translateY(0);
    height: 100%;
}

.slot-reel:has(.slot-item-image) .slot-item-image {
    height: 100%;
}

/* Result Modal Image */
.result-image {
    max-width: 120px;
    max-height: 120px;
    object-fit: contain;
    border-radius: var(--radius-md);
}

.match-item .result-image {
    display: block;
}

/* Responsive Image Mode */
@media (max-width: 1200px) {
    .image-preview-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .result-image {
        max-width: 80px;
        max-height: 80px;
    }
}

@media (max-width: 480px) {
    .mode-toggle-btn {
        padding: 8px 12px;
        font-size: 12px;
    }

    .mode-toggle-btn span {
        display: none;
    }

    .image-preview-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ==========================================
   TEAM GENERATOR STYLES
   ========================================== */

/* Team Generator App */
.team-generator-app {
    grid-template-columns: 300px 1fr 300px;
}

/* Team Generator Main Area */
.team-generator-main {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    min-height: 100vh;
    overflow-y: auto;
    gap: 20px;
}

.team-generator-main .wheel-title {
    margin-bottom: 0;
}

/* Teams Display Container */
.teams-display-container {
    width: 100%;
    max-width: 900px;
    min-height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
}

/* Placeholder State */
.teams-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    text-align: center;
    padding: 60px 20px;
}

.teams-placeholder svg {
    opacity: 0.3;
    margin-bottom: 16px;
}

.teams-placeholder p {
    font-size: 16px;
    margin: 0;
}

/* Loading State */
.teams-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
}

.loading-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid var(--border-color);
    border-top-color: var(--brand-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-bottom: 16px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.teams-loading p {
    color: var(--text-secondary);
    font-size: 14px;
    margin: 0;
}

/* Teams Grid */
.teams-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    width: 100%;
}

/* Team Card */
.team-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 2px solid var(--team-color, var(--brand-primary));
    overflow: hidden;
    box-shadow: 0 4px 12px var(--shadow-color);
    opacity: 0;
    transform: translateY(20px);
}

.team-card-animate {
    animation: teamCardIn 0.4s ease forwards;
}

@keyframes teamCardIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.team-header {
    background: var(--team-color, var(--brand-primary));
    color: var(--brand-dark);
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.team-number {
    font-weight: 700;
    font-size: 16px;
}

.team-count {
    font-size: 12px;
    opacity: 0.8;
}

.team-members {
    list-style: none;
    margin: 0;
    padding: 12px 16px;
}

.team-member {
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
    font-size: 14px;
}

.team-member:last-child {
    border-bottom: none;
}

/* Team Count Control */
.team-count-section {
    text-align: center;
}

.team-count-control {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 12px;
}

.team-count-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--bg-input);
    border: 2px solid var(--border-color);
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

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

.team-count-value {
    font-size: 36px;
    font-weight: 700;
    color: var(--brand-primary);
    min-width: 60px;
    text-align: center;
}

.team-count-hint {
    color: var(--text-muted);
    font-size: 11px;
    margin-top: 8px;
    margin-bottom: 0;
}

/* Generate Button Container */
.generate-button-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

/* Generate Button */
.generate-button {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: var(--brand-primary);
    color: var(--brand-dark);
    border: none;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 2px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(255, 190, 77, 0.3);
    transition: box-shadow 0.3s ease, filter 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.generate-button:hover {
    box-shadow: 0 6px 20px rgba(255, 190, 77, 0.5);
    filter: brightness(1.1);
}

.generate-button:active {
    filter: brightness(0.95);
}

.generate-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Team Generator Wheel Controls - positioned below the button */
.generate-button-container .wheel-controls {
    position: relative;
    margin-top: 0;
}

/* Team Generator Responsive */
@media (max-width: 1200px) {
    .team-generator-app {
        grid-template-columns: 1fr;
    }

    .teams-grid {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    }
}

@media (max-width: 768px) {
    .teams-display-container {
        min-height: 200px;
    }

    .teams-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 12px;
    }

    .team-header {
        padding: 10px 12px;
    }

    .team-number {
        font-size: 14px;
    }

    .team-members {
        padding: 8px 12px;
    }

    .team-member {
        padding: 6px 0;
        font-size: 13px;
    }

    .team-count-value {
        font-size: 28px;
    }

    .team-count-btn {
        width: 38px;
        height: 38px;
    }

    .generate-button {
        width: 90px;
        height: 90px;
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .teams-grid {
        grid-template-columns: 1fr 1fr;
    }

    .generate-button {
        width: 80px;
        height: 80px;
        font-size: 11px;
        letter-spacing: 1px;
    }
}

/* ==========================================================================
   RANDOM EMOJI GENERATOR STYLES
   ========================================================================== */

/* Emoji Display Container */
.emoji-display-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    padding: 20px;
    min-height: 400px;
}

.emoji-display {
    width: 280px;
    height: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    border-radius: 50%;
    box-shadow:
        0 10px 40px var(--shadow-color),
        inset 0 2px 10px rgba(255, 255, 255, 0.1);
    margin-bottom: 24px;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    position: relative;
    border: 5px solid var(--border-color);
}

.emoji-display.clickable {
    cursor: pointer;
}

.emoji-display.clickable:hover {
    transform: scale(1.05);
    border-color: var(--brand-primary);
    box-shadow:
        0 15px 50px var(--shadow-color),
        0 0 0 8px rgba(255, 190, 77, 0.2),
        inset 0 2px 10px rgba(255, 255, 255, 0.1);
}

.emoji-display.clickable:active {
    transform: scale(0.95);
}

.emoji-display::before {
    content: '';
    position: absolute;
    inset: -8px;
    border-radius: 50%;
    border: 2px dashed var(--brand-primary);
    opacity: 0.3;
    animation: emoji-border-rotate 20s linear infinite;
}

@keyframes emoji-border-rotate {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.emoji-display.spinning {
    animation: emoji-pulse 0.1s ease-in-out infinite;
}

.emoji-display.spinning::before {
    animation: emoji-border-rotate 1s linear infinite;
}

@keyframes emoji-pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

.emoji-display.result-shown {
    animation: emoji-pop 0.4s ease-out;
}

@keyframes emoji-pop {
    0% {
        transform: scale(0.8);
    }

    50% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
    }
}

.emoji-face {
    font-size: 140px;
    line-height: 1;
    transition: transform 0.3s ease;
}

.emoji-display:hover .emoji-face {
    transform: scale(1.1);
}

.emoji-name {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    text-align: center;
    margin-bottom: 16px;
    min-height: 24px;
}

/* Copy Emoji Button - now uses control-btn style */
#copyEmojiBtn.copied {
    background: #22c55e;
    border-color: #22c55e;
    color: white;
}

/* Category Buttons */
.category-buttons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.category-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 12px 8px;
    background: var(--bg-input);
    border: 2px solid transparent;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.category-btn:hover {
    background: var(--bg-card);
    border-color: var(--border-color);
    transform: translateY(-2px);
}

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

.category-emoji {
    font-size: 24px;
    line-height: 1;
}

/* Emoji History Styles */
.emoji-history {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.emoji-history-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: var(--bg-input);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
}

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

.emoji-history-item.copied {
    background: #22c55e;
    color: white;
}

.history-emoji {
    font-size: 24px;
    line-height: 1;
}

.history-name {
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
}

/* Emoji Stats */
.emoji-stat {
    font-size: 28px !important;
    line-height: 1;
}

/* Emoji Generator Main Area */
.emoji-generator-main {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    padding-bottom: 40px;
}

.emoji-generator-main .wheel-title {
    margin-bottom: 20px;
}

.emoji-display-container .wheel-controls {
    margin-top: 10px;
}

/* Emoji Generator Responsive */
@media (max-width: 1024px) {
    .emoji-generator-app {
        grid-template-columns: 1fr;
    }

    .emoji-generator-app .sidebar-left,
    .emoji-generator-app .sidebar-right {
        display: none;
    }

    .emoji-generator-app.sidebar-left-open .sidebar-left,
    .emoji-generator-app.sidebar-right-open .sidebar-right {
        display: block;
        position: fixed;
        top: 0;
        bottom: 0;
        width: 300px;
        z-index: 1000;
        overflow-y: auto;
    }

    .emoji-generator-app.sidebar-left-open .sidebar-left {
        left: 0;
    }

    .emoji-generator-app.sidebar-right-open .sidebar-right {
        right: 0;
    }

    .emoji-display {
        width: 220px;
        height: 220px;
    }

    .emoji-face {
        font-size: 110px;
    }

    .emoji-generator-main {
        padding-bottom: 40px;
    }
}

@media (max-width: 768px) {
    .emoji-display {
        width: 200px;
        height: 200px;
    }

    .emoji-face {
        font-size: 100px;
    }

    .emoji-name {
        font-size: 16px;
    }

    .category-buttons {
        grid-template-columns: repeat(3, 1fr);
    }

    .category-btn {
        padding: 10px 6px;
        font-size: 11px;
    }

    .category-emoji {
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .emoji-display {
        width: 160px;
        height: 160px;
    }

    .emoji-face {
        font-size: 80px;
    }

    .emoji-name {
        font-size: 14px;
    }

    .copy-emoji-btn {
        padding: 10px 18px;
        font-size: 13px;
    }

    .category-buttons {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ================================================
   Share Modal Styles
   ================================================ */

.share-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(4, 4, 5, 0.85);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    overflow-y: auto;
    padding: 20px 0;
    /* Hide scrollbar but keep scrollable */
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* IE and Edge */
}

.share-modal::-webkit-scrollbar {
    display: none;
    /* Chrome, Safari, Opera */
}

.share-modal.show {
    opacity: 1;
    visibility: visible;
}

.share-modal-content {
    background: #0e0e19;
    border: 1px solid var(--border-color, rgba(255, 255, 255, 0.1));
    border-radius: 16px;
    padding: 32px;
    padding-bottom: 32px;
    max-width: 420px;
    width: 90%;
    position: relative;
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s ease;
    margin: auto;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    /* Hide scrollbar but keep scrollable */
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* IE and Edge */
}

.share-modal-content::-webkit-scrollbar {
    display: none;
    /* Chrome, Safari, Opera */
}

.share-modal.show .share-modal-content {
    transform: scale(1) translateY(0);
}

/* Scroll indicator - only visible when content overflows */
.share-scroll-indicator {
    display: none;
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 190, 77, 0.15);
    border: 1px solid rgba(255, 190, 77, 0.3);
    border-radius: 20px;
    padding: 6px 12px;
    color: var(--brand-primary, #ffbe4d);
    font-size: 12px;
    font-weight: 500;
    gap: 6px;
    align-items: center;
    animation: scrollBounce 1.5s ease-in-out infinite;
    pointer-events: none;
    z-index: 10;
}

.share-scroll-indicator svg {
    width: 14px;
    height: 14px;
}

@keyframes scrollBounce {

    0%,
    100% {
        transform: translateX(-50%) translateY(0);
    }

    50% {
        transform: translateX(-50%) translateY(4px);
    }
}

/* Show scroll indicator only when modal content is scrollable */
.share-modal-content.has-overflow .share-scroll-indicator {
    display: flex;
}

.share-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    border: none;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    color: var(--text-muted, rgba(255, 255, 255, 0.5));
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.share-modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary, #fff);
}

.share-content {
    text-align: center;
}

.share-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, rgba(255, 190, 77, 0.2) 0%, rgba(255, 190, 77, 0.05) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--brand-primary, #ffbe4d);
}

.share-icon.login-required {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.02) 100%);
    color: var(--text-muted, rgba(255, 255, 255, 0.5));
}

.share-content h3 {
    font-family: 'Rubik', sans-serif;
    font-size: 22px;
    font-weight: 600;
    color: var(--text-primary, #fff);
    margin: 0 0 12px 0;
}

.share-content p {
    font-size: 14px;
    color: var(--text-muted, rgba(255, 255, 255, 0.5));
    line-height: 1.6;
    margin: 0 0 24px 0;
}

/* Share Link Container */
.share-link-container {
    margin-bottom: 20px;
}

.share-link-input-wrapper {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
}

.share-link-input {
    flex: 1;
    padding: 12px 16px;
    background: var(--bg-input, #505152);
    border: 1px solid var(--border-color, rgba(255, 255, 255, 0.1));
    border-radius: 8px;
    color: var(--text-primary, #fff);
    font-size: 13px;
    font-family: monospace;
}

.share-link-input:focus {
    outline: none;
    border-color: var(--brand-primary, #ffbe4d);
}

.copy-link-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 12px 16px;
    background: var(--brand-primary, #ffbe4d);
    border: none;
    border-radius: 8px;
    color: #040405;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.copy-link-btn:hover {
    background: #ffc966;
    transform: translateY(-1px);
}

.copy-link-btn.copied {
    background: #31a354;
    color: #fff;
}

.share-link-hint {
    font-size: 12px;
    color: var(--text-muted, rgba(255, 255, 255, 0.4));
    margin: 0;
}

/* Generate Button */
.btn-share-generate {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    background: var(--brand-primary, #ffbe4d);
    border: none;
    border-radius: 10px;
    color: #040405;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-share-generate:hover {
    background: #ffc966;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(255, 190, 77, 0.3);
}

.btn-share-generate:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-share-generate.loading {
    pointer-events: none;
}

.btn-share-generate.loading span {
    opacity: 0;
}

.btn-share-generate.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid #040405;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Login Buttons */
.share-login-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.btn-share-login,
.btn-share-register {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 28px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
}

.btn-share-login {
    background: var(--brand-primary, #ffbe4d);
    color: #040405;
}

.btn-share-login:hover {
    background: #ffc966;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(255, 190, 77, 0.3);
}

.btn-share-register {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-primary, #fff);
}

.btn-share-register:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

/* Light mode adjustments (body without dark-mode class = light mode) */
body:not(.dark-mode) .share-modal-content,
.wod-app.light-mode .share-modal-content {
    background: #ffffff;
    border-color: rgba(0, 0, 0, 0.1);
}

body:not(.dark-mode) .share-modal-close,
.wod-app.light-mode .share-modal-close {
    background: rgba(0, 0, 0, 0.05);
    color: #505152;
}

body:not(.dark-mode) .share-modal-close:hover,
.wod-app.light-mode .share-modal-close:hover {
    background: rgba(0, 0, 0, 0.1);
    color: #040405;
}

body:not(.dark-mode) .share-icon.login-required,
.wod-app.light-mode .share-icon.login-required {
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.05) 0%, rgba(0, 0, 0, 0.02) 100%);
    color: #505152;
}

body:not(.dark-mode) .share-content h3,
.wod-app.light-mode .share-content h3 {
    color: #040405;
}

body:not(.dark-mode) .share-content p,
body:not(.dark-mode) .share-link-hint,
.wod-app.light-mode .share-content p,
.wod-app.light-mode .share-link-hint {
    color: #505152;
}

body:not(.dark-mode) .share-link-input,
.wod-app.light-mode .share-link-input {
    background: #f0f0f0;
    border-color: rgba(0, 0, 0, 0.1);
    color: #040405;
}

body:not(.dark-mode) .btn-share-register,
.wod-app.light-mode .btn-share-register {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.1);
    color: #040405;
}

body:not(.dark-mode) .btn-share-register:hover,
.wod-app.light-mode .btn-share-register:hover {
    background: rgba(0, 0, 0, 0.1);
}

body:not(.dark-mode) .share-scroll-indicator,
.wod-app.light-mode .share-scroll-indicator {
    background: rgba(255, 190, 77, 0.2);
    border-color: rgba(255, 190, 77, 0.4);
    color: #b8860b;
}

/* Share Options Form */
.share-options-form {
    text-align: left;
    margin-bottom: 20px;
}

.share-form-group {
    margin-bottom: 16px;
}

.share-form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary, #fff);
    margin-bottom: 8px;
}

.share-form-input {
    width: 100%;
    padding: 12px 14px;
    background: var(--bg-input, #505152);
    border: 1px solid var(--border-color, rgba(255, 255, 255, 0.1));
    border-radius: 8px;
    color: var(--text-primary, #fff);
    font-size: 14px;
    font-family: inherit;
    transition: all 0.2s ease;
}

.share-form-input:focus {
    outline: none;
    border-color: var(--brand-primary, #ffbe4d);
    box-shadow: 0 0 0 3px rgba(255, 190, 77, 0.1);
}

.share-form-input::placeholder {
    color: var(--text-muted, rgba(255, 255, 255, 0.4));
}

/* Access Control Options */
.share-access-options {
    display: flex;
    flex-direction: row;
    gap: 10px;
}

.share-radio-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px 12px;
    flex: 1;
    background: var(--bg-input, #505152);
    border: 1px solid var(--border-color, rgba(255, 255, 255, 0.1));
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.share-radio-option:hover {
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.05);
}

.share-radio-option.active {
    border-color: var(--brand-primary, #ffbe4d);
    background: rgba(255, 190, 77, 0.1);
}

.share-radio-option input[type="radio"] {
    display: none;
}

.share-radio-option .radio-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    color: var(--text-muted, rgba(255, 255, 255, 0.5));
    transition: all 0.2s ease;
}

.share-radio-option.active .radio-icon {
    background: var(--brand-primary, #ffbe4d);
    color: #040405;
}

.share-radio-option .radio-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.share-radio-option .radio-text strong {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary, #fff);
}

.share-radio-option .radio-text small {
    font-size: 11px;
    color: var(--text-muted, rgba(255, 255, 255, 0.5));
}

/* Spin Limit */
.share-spin-limit-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
}

.share-spin-limit-wrapper .share-form-input {
    width: 100px;
    text-align: center;
}

.spin-limit-hint {
    font-size: 12px;
    color: var(--text-muted, rgba(255, 255, 255, 0.5));
}

/* Light mode adjustments for share form */
body:not(.dark-mode) .share-form-group label,
.wod-app.light-mode .share-form-group label {
    color: #040405;
}

body:not(.dark-mode) .share-form-input,
.wod-app.light-mode .share-form-input {
    background: #f0f0f0;
    border-color: rgba(0, 0, 0, 0.1);
    color: #040405;
}

body:not(.dark-mode) .share-form-input::placeholder,
.wod-app.light-mode .share-form-input::placeholder {
    color: #757575;
}

body:not(.dark-mode) .share-radio-option,
.wod-app.light-mode .share-radio-option {
    background: #f0f0f0;
    border-color: rgba(0, 0, 0, 0.1);
}

body:not(.dark-mode) .share-radio-option:hover,
.wod-app.light-mode .share-radio-option:hover {
    border-color: rgba(0, 0, 0, 0.2);
    background: rgba(0, 0, 0, 0.05);
}

body:not(.dark-mode) .share-radio-option.active,
.wod-app.light-mode .share-radio-option.active {
    border-color: var(--brand-primary, #ffbe4d);
    background: rgba(255, 190, 77, 0.15);
}

body:not(.dark-mode) .share-radio-option .radio-icon,
.wod-app.light-mode .share-radio-option .radio-icon {
    background: rgba(0, 0, 0, 0.05);
    color: #757575;
}

body:not(.dark-mode) .share-radio-option .radio-text strong,
.wod-app.light-mode .share-radio-option .radio-text strong {
    color: #040405;
}

body:not(.dark-mode) .share-radio-option .radio-text small,
.wod-app.light-mode .share-radio-option .radio-text small {
    color: #757575;
}

body:not(.dark-mode) .spin-limit-hint,
.wod-app.light-mode .spin-limit-hint {
    color: #757575;
}

/* Responsive */
@media (max-width: 480px) {
    .share-modal-content {
        padding: 24px;
        margin: 16px;
    }

    .share-icon {
        width: 64px;
        height: 64px;
    }

    .share-icon svg {
        width: 36px;
        height: 36px;
    }

    .share-content h3 {
        font-size: 20px;
    }

    .share-link-input-wrapper {
        flex-direction: column;
    }

    .copy-link-btn {
        justify-content: center;
    }

    .share-spin-limit-wrapper {
        flex-direction: column;
        align-items: flex-start;
    }

    .share-spin-limit-wrapper .share-form-input {
        width: 100%;
    }
}

/* ================================================
   Spin Limit Banner
   ================================================ */

.spin-limit-banner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 16px;
}

.spin-limit-banner.has-spins {
    background: rgba(255, 190, 77, 0.15);
    border: 1px solid rgba(255, 190, 77, 0.3);
    color: var(--brand-primary, #ffbe4d);
}

.spin-limit-banner.no-spins {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #ef4444;
}

.spin-limit-banner svg {
    flex-shrink: 0;
}

/* Light mode */
.wod-app.light-mode .spin-limit-banner.has-spins {
    background: rgba(255, 190, 77, 0.2);
    color: #b8860b;
}

.wod-app.light-mode .spin-limit-banner.no-spins {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
}

/* ================================================
   Login Required Overlay
   ================================================ */

.wheel-login-required-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(4, 4, 5, 0.9);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    z-index: 100;
}

.login-required-content {
    text-align: center;
    padding: 40px;
    max-width: 320px;
}

.login-required-content svg {
    color: var(--text-muted, rgba(255, 255, 255, 0.5));
    margin-bottom: 16px;
}

.login-required-content h3 {
    font-family: 'Rubik', sans-serif;
    font-size: 22px;
    font-weight: 600;
    color: var(--text-primary, #fff);
    margin: 0 0 12px 0;
}

.login-required-content p {
    font-size: 14px;
    color: var(--text-muted, rgba(255, 255, 255, 0.6));
    line-height: 1.6;
    margin: 0 0 24px 0;
}

.btn-login-wheel {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 32px;
    background: var(--brand-primary, #ffbe4d);
    border: none;
    border-radius: 10px;
    color: #040405;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
}

.btn-login-wheel:hover {
    background: #ffc966;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(255, 190, 77, 0.3);
}

/* Disabled spin button */
.spin-button.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* Light mode */
.wod-app.light-mode .wheel-login-required-overlay {
    background: rgba(255, 255, 255, 0.95);
}

.wod-app.light-mode .login-required-content svg {
    color: #757575;
}

.wod-app.light-mode .login-required-content h3 {
    color: #040405;
}

.wod-app.light-mode .login-required-content p {
    color: #505152;
}

/* ================================
   Unique Results Toggle Option
   ================================ */
.unique-results-group {
    margin-top: 8px;
}

.share-toggle-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: var(--bg-input, #505152);
    border: 1px solid var(--border-color, rgba(255, 255, 255, 0.1));
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.share-toggle-option:hover {
    border-color: rgba(255, 190, 77, 0.5);
    background: rgba(255, 190, 77, 0.08);
}

.share-toggle-option input[type="checkbox"] {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Active state when checked */
.share-toggle-option.active {
    background: rgba(255, 190, 77, 0.1);
    border-color: #ffbe4d;
}

.share-toggle-option .radio-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    transition: all 0.2s ease;
}

.share-toggle-option.active .radio-icon {
    background: #ffbe4d;
}

.share-toggle-option .radio-icon svg {
    stroke: #ffbe4d;
    transition: all 0.2s ease;
}

.share-toggle-option.active .radio-icon svg {
    stroke: #040405;
}

.share-toggle-option .radio-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.share-toggle-option .radio-text strong {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary, #fff);
}

.share-toggle-option .radio-text small {
    font-size: 12px;
    color: var(--text-muted, rgba(255, 255, 255, 0.5));
    line-height: 1.4;
}

/* Light mode adjustments for toggle option */
body:not(.dark-mode) .share-toggle-option,
.wod-app.light-mode .share-toggle-option {
    background: #f5f5f5;
    border-color: rgba(0, 0, 0, 0.1);
}

body:not(.dark-mode) .share-toggle-option:hover,
.wod-app.light-mode .share-toggle-option:hover {
    background: rgba(255, 190, 77, 0.1);
    border-color: rgba(255, 190, 77, 0.5);
}

body:not(.dark-mode) .share-toggle-option.active,
.wod-app.light-mode .share-toggle-option.active {
    background: rgba(255, 190, 77, 0.15);
    border-color: #ffbe4d;
}

body:not(.dark-mode) .share-toggle-option .radio-icon,
.wod-app.light-mode .share-toggle-option .radio-icon {
    background: rgba(0, 0, 0, 0.05);
}

body:not(.dark-mode) .share-toggle-option.active .radio-icon,
.wod-app.light-mode .share-toggle-option.active .radio-icon {
    background: #ffbe4d;
}

body:not(.dark-mode) .share-toggle-option .radio-text strong,
.wod-app.light-mode .share-toggle-option .radio-text strong {
    color: #1a1a1a;
}

body:not(.dark-mode) .share-toggle-option .radio-text small,
.wod-app.light-mode .share-toggle-option .radio-text small {
    color: rgba(0, 0, 0, 0.6);
}

/* ================================
   Result Only Mode (centered layout)
   Both sidebars hidden, content centered
   ================================ */
.wod-app.result-only-mode {
    display: block !important;
}

.wod-app.result-only-mode .wheel-main {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    width: 100%;
}

.wod-app.result-only-mode .wheel-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

/* Hide sidebar toggles (Results/Settings) in shared wheel view only */
.wod-app.shared-wheel-view .panel-toggles,
.wod-app.shared-wheel-view .mobile-toggles,
.main.shared-wheel-view .panel-toggles,
.main.shared-wheel-view .mobile-toggles {
    display: none !important;
}

/* Hide entries section and Remove Winner toggle in shared wheel view */
.wod-app.shared-wheel-view .entries-section,
.main.shared-wheel-view .entries-section {
    display: none !important;
}

.wod-app.shared-wheel-view #removeWinnerToggle,
.main.shared-wheel-view #removeWinnerToggle {
    display: none !important;
}

.wod-app.shared-wheel-view #shareBtn,
.main.shared-wheel-view #shareBtn {
    display: none !important;
}

/* ================================
   Previous Result View
   ================================ */
.previous-result-view {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 40px;
    min-height: 500px;
}

.previous-result-view .result-icon {
    width: 100px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 190, 77, 0.15);
    border-radius: 50%;
    margin-bottom: 24px;
}

.previous-result-view .result-icon svg {
    stroke: var(--brand-primary, #ffbe4d);
}

.previous-result-view .result-title {
    font-family: 'Rubik', sans-serif;
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary, #fff);
    margin: 0 0 8px 0;
}

.previous-result-view .result-subtitle {
    font-size: 16px;
    color: var(--text-muted, rgba(255, 255, 255, 0.5));
    margin: 0 0 32px 0;
}

.previous-result-view .result-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 32px 48px;
    background: linear-gradient(135deg, rgba(255, 190, 77, 0.2) 0%, rgba(255, 190, 77, 0.1) 100%);
    border: 2px solid var(--brand-primary, #ffbe4d);
    border-radius: 16px;
    margin-bottom: 16px;
}

.previous-result-view .result-label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--brand-primary, #ffbe4d);
}

.previous-result-view .result-value {
    font-family: 'Rubik', sans-serif;
    font-size: 36px;
    font-weight: 700;
    color: var(--text-primary, #fff);
    word-break: break-word;
    max-width: 400px;
}

.previous-result-view .result-date {
    font-size: 13px;
    color: var(--text-muted, rgba(255, 255, 255, 0.5));
    margin: 0 0 32px 0;
}

.btn-back-home {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 24px;
    background: var(--brand-primary, #ffbe4d);
    color: #040405;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    border-radius: 10px;
    transition: all 0.2s ease;
}

.btn-back-home:hover {
    background: #ffc94d;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(255, 190, 77, 0.3);
}

.btn-back-home svg {
    stroke: currentColor;
}

/* ================================
   Unique Results Banner
   ================================ */
.unique-results-banner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    background: rgba(168, 85, 247, 0.15);
    color: #a855f7;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    margin-top: 12px;
}

.unique-results-banner svg {
    stroke: currentColor;
    flex-shrink: 0;
}

/* ================================
   User Spin History (for shared wheels)
   ================================ */
.user-spin-history {
    width: 100%;
    max-width: 400px;
    margin: 24px auto 0;
    background: var(--bg-secondary, rgba(255, 255, 255, 0.05));
    border-radius: 12px;
    padding: 16px;
    border: 1px solid var(--border-color, rgba(255, 255, 255, 0.1));
}

.user-spin-history .spin-history-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color, rgba(255, 255, 255, 0.1));
    margin-bottom: 12px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary, #fff);
}

.user-spin-history .spin-history-header svg {
    stroke: var(--brand-primary, #ffbe4d);
    flex-shrink: 0;
}

.user-spin-history .spin-history-count {
    margin-left: auto;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-muted, rgba(255, 255, 255, 0.5));
    background: var(--bg-tertiary, rgba(255, 255, 255, 0.1));
    padding: 2px 8px;
    border-radius: 10px;
}

.user-spin-history .spin-history-list {
    max-height: 250px;
    overflow-y: auto;
}

.user-spin-history .spin-history-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color, rgba(255, 255, 255, 0.05));
}

.user-spin-history .spin-history-item:last-child {
    border-bottom: none;
}

.user-spin-history .spin-result {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary, #fff);
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding-right: 12px;
}

.user-spin-history .spin-date {
    font-size: 12px;
    color: var(--text-muted, rgba(255, 255, 255, 0.5));
    flex-shrink: 0;
}

.user-spin-history .load-more-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    margin-top: 12px;
    padding: 10px 16px;
    background: var(--bg-tertiary, rgba(255, 255, 255, 0.1));
    border: none;
    border-radius: 8px;
    color: var(--text-primary, #fff);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.user-spin-history .load-more-btn:hover {
    background: var(--bg-hover, rgba(255, 255, 255, 0.15));
}

.user-spin-history .load-more-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.user-spin-history .load-more-btn svg {
    stroke: currentColor;
}

.loading-spinner-small {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: var(--brand-primary, #ffbe4d);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* Light mode adjustments for user spin history */
[data-theme="light"] .user-spin-history {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .user-spin-history .spin-history-header {
    border-color: rgba(0, 0, 0, 0.1);
    color: #1a1a2e;
}

[data-theme="light"] .user-spin-history .spin-history-count {
    background: rgba(0, 0, 0, 0.08);
    color: rgba(0, 0, 0, 0.5);
}

[data-theme="light"] .user-spin-history .spin-history-item {
    border-color: rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .user-spin-history .spin-result {
    color: #1a1a2e;
}

[data-theme="light"] .user-spin-history .spin-date {
    color: rgba(0, 0, 0, 0.5);
}

[data-theme="light"] .user-spin-history .load-more-btn {
    background: rgba(0, 0, 0, 0.08);
    color: #1a1a2e;
}

[data-theme="light"] .user-spin-history .load-more-btn:hover {
    background: rgba(0, 0, 0, 0.12);
}

[data-theme="light"] .loading-spinner-small {
    border-color: rgba(0, 0, 0, 0.2);
    border-top-color: var(--brand-primary, #ffbe4d);
}

/* ================================
   Wheel Not Found View
   ================================ */
.wheel-not-found-view {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 40px;
    min-height: 500px;
}

.wheel-not-found-view .not-found-icon {
    width: 100px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(239, 68, 68, 0.15);
    border-radius: 50%;
    margin-bottom: 24px;
}

.wheel-not-found-view .not-found-icon svg {
    stroke: #ef4444;
}

.wheel-not-found-view .not-found-title {
    font-family: 'Rubik', sans-serif;
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary, #fff);
    margin: 0 0 12px 0;
}

.wheel-not-found-view .not-found-message {
    font-size: 16px;
    color: var(--text-muted, rgba(255, 255, 255, 0.5));
    margin: 0 0 32px 0;
    max-width: 350px;
    line-height: 1.5;
}

.btn-go-home {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    background: var(--brand-primary, #ffbe4d);
    color: #1a1a2e;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    border-radius: 10px;
    transition: all 0.2s ease;
}

.btn-go-home:hover {
    background: #ffc94d;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(255, 190, 77, 0.3);
}

.btn-go-home svg {
    stroke: currentColor;
}

/* Light mode adjustments for not found view */
[data-theme="light"] .wheel-not-found-view .not-found-title {
    color: #1a1a2e;
}

[data-theme="light"] .wheel-not-found-view .not-found-message {
    color: rgba(0, 0, 0, 0.5);
}

/* ================================
   All Claimed View
   ================================ */
.all-claimed-view {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 40px;
    min-height: 500px;
}

.all-claimed-view .claimed-icon {
    width: 100px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(34, 197, 94, 0.15);
    border-radius: 50%;
    margin-bottom: 24px;
}

.all-claimed-view .claimed-icon svg {
    stroke: #22c55e;
}

.all-claimed-view .claimed-title {
    font-family: 'Rubik', sans-serif;
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary, #fff);
    margin: 0 0 8px 0;
}

.all-claimed-view .claimed-subtitle {
    font-size: 16px;
    color: var(--text-muted, rgba(255, 255, 255, 0.5));
    margin: 0 0 32px 0;
    max-width: 300px;
}

/* Light mode adjustments */
.wod-app.light-mode .previous-result-view .result-title,
.wod-app.light-mode .all-claimed-view .claimed-title {
    color: #040405;
}

.wod-app.light-mode .previous-result-view .result-value {
    color: #040405;
}

/* ========================================
   Shared Wheel Info Section
   ======================================== */

.shared-wheel-section {
    padding: 20px;
}

.shared-wheel-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 20px 0;
}

.shared-wheel-icon {
    margin-bottom: 16px;
    color: var(--brand-primary);
}

.shared-wheel-icon svg {
    opacity: 0.8;
}

.shared-wheel-message {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.6;
    margin: 0 0 24px 0;
    max-width: 240px;
}

.btn-create-own {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: var(--brand-primary);
    color: var(--brand-dark);
    border: none;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-create-own:hover {
    background: #ffc861;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 190, 77, 0.3);
}

.btn-create-own svg {
    flex-shrink: 0;
}

/* Dark mode adjustments */
body.dark-mode .shared-wheel-message {
    color: rgba(255, 255, 255, 0.6);
}

body.dark-mode .btn-create-own {
    color: #040405;
}

/* ================================
   A to Z Wheel - Filter Section
   ================================ */
.a-to-z-app .filter-section {
    padding-bottom: 16px;
}

.filter-options {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.filter-toggle-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-toggle-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 12px 14px;
    background: var(--bg-input);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
}

.filter-toggle-btn:hover {
    border-color: var(--brand-primary);
    background: rgba(255, 190, 77, 0.05);
}

.filter-toggle-btn.active {
    background: rgba(255, 190, 77, 0.15);
    border-color: var(--brand-primary);
    color: var(--text-primary);
}

.filter-toggle-btn .filter-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: var(--bg-tertiary);
    color: var(--text-muted);
    transition: all 0.2s ease;
}

.filter-toggle-btn.active .filter-icon {
    background: var(--brand-primary);
    color: var(--brand-dark);
}

.filter-toggle-btn .filter-label {
    flex: 1;
}

.filter-toggle-btn .filter-count {
    font-size: 11px;
    font-weight: 600;
    padding: 3px 8px;
    background: var(--bg-tertiary);
    border-radius: 10px;
    color: var(--text-muted);
}

.filter-toggle-btn.active .filter-count {
    background: var(--brand-primary);
    color: var(--brand-dark);
}

.current-letters {
    padding: 12px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.letters-label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.letters-display {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: 2px;
    line-height: 1.6;
    word-break: break-all;
}

/* A to Z App - uses same base styles as wod-app */
.a-to-z-app {
    display: flex;
    min-height: calc(100vh - 120px);
    position: relative;
}

/* Dark mode adjustments for filter section */
body.dark-mode .filter-toggle-btn {
    background: var(--bg-input);
    border-color: var(--border-color);
}

body.dark-mode .filter-toggle-btn:hover {
    background: rgba(255, 190, 77, 0.08);
}

body.dark-mode .filter-toggle-btn.active {
    background: rgba(255, 190, 77, 0.12);
}

body.dark-mode .current-letters {
    background: var(--bg-tertiary);
    border-color: var(--border-color);
}

/* A to Z Fullscreen Mode */
.a-to-z-app.fullscreen-mode {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    background: var(--bg-main);
}

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

.a-to-z-app.fullscreen-mode .panel-toggles,
.a-to-z-app.fullscreen-mode .mobile-toggles {
    display: flex;
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
}

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

.a-to-z-app.fullscreen-mode .wheel {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.a-to-z-app.fullscreen-mode .wheel-center {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.a-to-z-app.fullscreen-mode .wheel-wrapper {
    width: min(80vw, 70vh);
    height: min(80vw, 70vh);
    max-width: 800px;
    max-height: 800px;
}

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

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

.a-to-z-app.fullscreen-mode .wheel-controls {
    margin-top: 40px;
}

.a-to-z-app.fullscreen-mode .control-btn {
    width: 56px;
    height: 56px;
}

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

.a-to-z-app.fullscreen-mode .ad-hor,
.a-to-z-app.fullscreen-mode .ad-ver {
    display: none !important;
}

@media (max-height: 700px) {
    .a-to-z-app.fullscreen-mode .wheel-wrapper {
        width: min(85vw, 65vh);
        height: min(85vw, 65vh);
    }

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

    .a-to-z-app.fullscreen-mode .wheel-title {
        margin-bottom: 20px;
    }

    .a-to-z-app.fullscreen-mode .wheel-controls {
        margin-top: 24px;
    }
}

@media (max-width: 768px) {
    .a-to-z-app.fullscreen-mode .wheel-wrapper {
        width: min(90vw, 70vh);
        height: min(90vw, 70vh);
    }
}

@media (max-width: 576px) {
    .a-to-z-app.fullscreen-mode .content {
        padding: 20px 15px;
    }

    .a-to-z-app.fullscreen-mode .wheel-wrapper {
        width: min(95vw, 65vh);
        height: min(95vw, 65vh);
    }
}

@media (max-height: 500px) and (orientation: landscape) {
    .a-to-z-app.fullscreen-mode .wheel-wrapper {
        width: min(70vw, 75vh);
        height: min(70vw, 75vh);
    }

    .a-to-z-app.fullscreen-mode .wheel-controls {
        margin-top: 15px;
    }
}

/* ================================
   Emoji Generator Styles
   ================================ */
.emoji-generator-app {
    display: flex;
    min-height: calc(100vh - 120px);
    position: relative;
}

/* Emoji Display Area */
.emoji-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.emoji-display-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.emoji-display {
    width: 280px;
    height: 280px;
    border-radius: 50%;
    background: linear-gradient(145deg, #1a1a1c 0%, #0d0d0e 100%);
    border: 3px dashed rgba(255, 190, 77, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.5),
        inset 0 2px 20px rgba(0, 0, 0, 0.3);
}

.emoji-display:hover {
    transform: scale(1.02);
    border-color: rgba(255, 190, 77, 0.6);
}

.emoji-display:active {
    transform: scale(0.98);
}

.emoji-display.spinning {
    animation: emojiSpin 0.1s linear infinite;
}

.emoji-display.result-shown {
    animation: emojiPop 0.3s ease-out;
}

@keyframes emojiSpin {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

@keyframes emojiPop {
    0% { transform: scale(0.8); }
    50% { transform: scale(1.15); }
    100% { transform: scale(1); }
}

.emoji-result {
    font-size: 120px;
    line-height: 1;
    user-select: none;
}

.emoji-name {
    font-size: 18px;
    font-weight: 600;
    color: var(--brand-primary);
    text-align: center;
    margin: 0;
    min-height: 28px;
}

/* Emoji Control Buttons Row */
.emoji-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 24px;
}

.emoji-control-btn {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: var(--bg-tertiary);
    border: 2px solid var(--border-color);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    position: relative;
}

.emoji-control-btn:hover {
    background: var(--bg-input);
    border-color: var(--brand-primary);
    color: var(--brand-primary);
}

.emoji-control-btn.copied {
    background: #4CAF50;
    border-color: #4CAF50;
    color: white;
}

.emoji-control-btn[data-tooltip]:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: -32px;
    left: 50%;
    transform: translateX(-50%);
    padding: 4px 10px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 11px;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    z-index: 10;
}

/* Light mode adjustments for emoji display */
body:not(.dark-mode) .emoji-display {
    background: linear-gradient(145deg, #f0f0f2 0%, #e0e0e2 100%);
    border-color: rgba(255, 190, 77, 0.5);
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.1),
        inset 0 2px 20px rgba(0, 0, 0, 0.05);
}

/* Category Buttons */
.category-section {
    padding-bottom: 16px;
}

.category-section .section-header {
    margin-bottom: 16px;
}

.category-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.category-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px 12px;
    background: var(--bg-tertiary);
    border: none;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 80px;
}

.category-btn:hover {
    background: rgba(255, 190, 77, 0.15);
}

.category-btn.active {
    background: var(--brand-primary);
}

.category-emoji {
    font-size: 32px;
    line-height: 1;
}

.category-label {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
}

.category-btn.active .category-label {
    color: var(--brand-dark);
    font-weight: 600;
}

/* Dark mode category buttons */
body.dark-mode .category-btn {
    background: #2a2a2c;
}

body.dark-mode .category-btn:hover {
    background: #3a3a3c;
}

body.dark-mode .category-btn.active {
    background: var(--brand-primary);
}

body.dark-mode .category-label {
    color: var(--text-muted);
}

body.dark-mode .category-btn.active .category-label {
    color: var(--brand-dark);
}

/* Emoji History Items */
.emoji-history-item {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.emoji-history-item:hover {
    background: rgba(255, 190, 77, 0.1);
}

.emoji-history-item.copied {
    background: rgba(76, 175, 80, 0.2);
}

.history-emoji {
    font-size: 24px;
    line-height: 1;
}

.history-name {
    font-size: 12px;
    color: var(--text-secondary);
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Emoji Generator Fullscreen Mode */
.emoji-generator-app.fullscreen-mode,
.emoji-generator-app.is-fullscreen {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    background: var(--bg-main);
}

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

.emoji-generator-app.fullscreen-mode .content,
.emoji-generator-app.is-fullscreen .content {
    width: 100%;
    height: 100%;
    padding: 40px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.emoji-generator-app.fullscreen-mode .wheel,
.emoji-generator-app.is-fullscreen .wheel {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.emoji-generator-app.fullscreen-mode .emoji-center,
.emoji-generator-app.is-fullscreen .emoji-center {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.emoji-generator-app.fullscreen-mode .emoji-display,
.emoji-generator-app.is-fullscreen .emoji-display {
    width: 340px;
    height: 340px;
}

.emoji-generator-app.fullscreen-mode .emoji-result,
.emoji-generator-app.is-fullscreen .emoji-result {
    font-size: 160px;
}

.emoji-generator-app.fullscreen-mode .emoji-name,
.emoji-generator-app.is-fullscreen .emoji-name {
    font-size: 24px;
}

.emoji-generator-app.fullscreen-mode .wheel-title h1,
.emoji-generator-app.is-fullscreen .wheel-title h1 {
    font-size: 36px;
}

.emoji-generator-app.fullscreen-mode .wheel-title p,
.emoji-generator-app.is-fullscreen .wheel-title p {
    font-size: 18px;
}

.emoji-generator-app.fullscreen-mode .emoji-controls,
.emoji-generator-app.is-fullscreen .emoji-controls {
    margin-top: 40px;
}

.emoji-generator-app.fullscreen-mode .emoji-control-btn,
.emoji-generator-app.is-fullscreen .emoji-control-btn {
    width: 56px;
    height: 56px;
}

.emoji-generator-app.fullscreen-mode .ad-hor,
.emoji-generator-app.fullscreen-mode .ad-ver,
.emoji-generator-app.is-fullscreen .ad-hor,
.emoji-generator-app.is-fullscreen .ad-ver {
    display: none !important;
}

/* Dark mode adjustments for emoji generator */
body.dark-mode .category-btn {
    background: var(--bg-input);
}

body.dark-mode .category-btn:hover {
    background: rgba(255, 190, 77, 0.08);
}

body.dark-mode .category-btn.active {
    background: rgba(255, 190, 77, 0.12);
}

/* Responsive adjustments for emoji generator */
@media (max-width: 768px) {
    .emoji-display {
        width: 220px;
        height: 220px;
    }

    .emoji-result {
        font-size: 90px;
    }

    .emoji-name {
        font-size: 16px;
    }

    .emoji-controls {
        gap: 12px;
        margin-top: 20px;
    }

    .emoji-control-btn {
        width: 44px;
        height: 44px;
    }

    .category-options {
        grid-template-columns: repeat(3, 1fr);
    }

    .category-btn {
        padding: 10px 8px;
    }

    .category-emoji {
        font-size: 24px;
    }

    .category-label {
        font-size: 10px;
    }
}

@media (max-width: 480px) {
    .emoji-display {
        width: 200px;
        height: 200px;
    }

    .emoji-result {
        font-size: 80px;
    }

    .category-options {
        grid-template-columns: repeat(2, 1fr);
    }
}