/* Mobile-optimized font sizes for MudBlazor components */
:root {
    --mud-typography-default-font-size: 0.875rem;
    --mud-typography-default-line-height: 1.5;
}

/* Override MudBlazor typography for mobile */
.mud-typography {
    font-size: 0.875rem !important;
    line-height: 1.5 !important;
}

.mud-typography-h1 { font-size: 2.5rem !important; font-weight: 500 !important; line-height: 1.2 !important; }
.mud-typography-h2 { font-size: 2rem !important; font-weight: 500 !important; line-height: 1.2 !important; }
.mud-typography-h3 { font-size: 1.75rem !important; font-weight: 500 !important; line-height: 1.3 !important; }
.mud-typography-h4 { font-size: 1.5rem !important; font-weight: 500 !important; line-height: 1.3 !important; }
.mud-typography-h5 { font-size: 1.125rem !important; font-weight: 500 !important; line-height: 1.4 !important; }
.mud-typography-h6 { font-size: 1rem !important; font-weight: 500 !important; line-height: 1.4 !important; }

.mud-typography-subtitle1 { font-size: 0.875rem !important; font-weight: 400 !important; line-height: 1.5 !important; }
.mud-typography-subtitle2 { font-size: 0.75rem !important; font-weight: 500 !important; line-height: 1.5 !important; }

.mud-typography-body1 { font-size: 0.875rem !important; font-weight: 400 !important; line-height: 1.5 !important; }
.mud-typography-body2 { font-size: 0.75rem !important; font-weight: 400 !important; line-height: 1.5 !important; }

.mud-button { font-size: 0.75rem !important; line-height: 1.75 !important; }

.mud-typography-caption { font-size: 0.625rem !important; line-height: 1.5 !important; }
.mud-typography-overline { font-size: 0.625rem !important; line-height: 1.5 !important; }

/* Smaller text in tables for mobile */
.mud-table { font-size: 0.75rem !important; }
.mud-table-cell { font-size: 0.75rem !important; padding: 8px 12px !important; }
.mud-table-head { font-size: 0.75rem !important; }

/* Smaller navigation items */
.mud-nav-link { font-size: 0.875rem !important; }

/* Smaller form labels and inputs */
.mud-input-label { font-size: 0.75rem !important; }
.mud-input-root { font-size: 0.875rem !important; }

/* Dark mode fix for MudBlazor inputs */
@media (prefers-color-scheme: dark) {
    .mud-input-root input,
    .mud-input-root textarea,
    .mud-select input {
        color: rgba(255, 255, 255, 0.87) !important;
    }

    .mud-input-root input::placeholder,
    .mud-input-root textarea::placeholder {
        color: rgba(255, 255, 255, 0.42) !important;
    }

    /* General input/select/textarea dark mode support */
    input:not([type="checkbox"]):not([type="radio"]),
    select,
    textarea {
        color: rgba(255, 255, 255, 0.87);
        border-color: rgba(255, 255, 255, 0.23);
    }

    input::placeholder,
    textarea::placeholder {
        color: rgba(255, 255, 255, 0.42);
    }

    /* Dropdown/Select text visibility */
    .mud-select-input,
    .mud-input-slot,
    .mud-select .mud-input-slot {
        color: rgba(255, 255, 255, 0.87) !important;
    }

    /* Dropdown menu items */
    .mud-popover .mud-list-item,
    .mud-popover .mud-list-item-text,
    .mud-select-item {
        color: rgba(255, 255, 255, 0.87) !important;
    }

    /* Selected item in dropdown */
    .mud-list-item.mud-selected {
        color: #E1C16E !important;  /* Gold for selected items */
        background-color: rgba(225, 193, 110, 0.1) !important;
    }

    /* Dropdown menu background */
    .mud-popover-paper,
    .mud-popover .mud-paper {
        background-color: #121A18 !important;  /* Dark surface color from theme */
    }
}

/* MudBlazor dark mode toggle support */
.dark-mode .mud-input-root input,
.dark-mode .mud-input-root textarea,
.dark-mode .mud-select input {
    color: rgba(255, 255, 255, 0.87) !important;
}

.dark-mode .mud-input-root input::placeholder,
.dark-mode .mud-input-root textarea::placeholder {
    color: rgba(255, 255, 255, 0.42) !important;
}

/* General input/select/textarea dark mode toggle support */
.dark-mode input:not([type="checkbox"]):not([type="radio"]),
.dark-mode select,
.dark-mode textarea {
    color: rgba(255, 255, 255, 0.87) !important;
    border-color: rgba(255, 255, 255, 0.23) !important;
}

.dark-mode input::placeholder,
.dark-mode textarea::placeholder {
    color: rgba(255, 255, 255, 0.42) !important;
}

/* Dark mode dropdown/select styling */
.dark-mode .mud-select-input,
.dark-mode .mud-input-slot,
.dark-mode .mud-select .mud-input-slot {
    color: rgba(255, 255, 255, 0.87) !important;
}

.dark-mode .mud-popover .mud-list-item,
.dark-mode .mud-popover .mud-list-item-text,
.dark-mode .mud-select-item {
    color: rgba(255, 255, 255, 0.87) !important;
}

.dark-mode .mud-list-item.mud-selected {
    color: #E1C16E !important;  /* Gold for selected items */
    background-color: rgba(225, 193, 110, 0.1) !important;
}

.dark-mode .mud-popover-paper,
.dark-mode .mud-popover .mud-paper {
    background-color: #121A18 !important;  /* Dark surface color from theme */
}

/* Smaller AppBar text */
.mud-appbar { font-size: 0.875rem !important; }

/* Smaller card content */
.mud-card-content { font-size: 0.875rem !important; }

/* Smaller list items */
.mud-list-item { font-size: 0.875rem !important; }

/* Standings table - force horizontal layout (no responsive stacking) */
.standings-table .mud-table-container {
    overflow-x: auto !important;
}

.standings-table table {
    min-width: 100% !important;
    table-layout: fixed !important;
}

.standings-table .mud-table-cell,
.standings-table .mud-table-head {
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    display: table-cell !important;
}

/* Fixed column widths for standings table - 2 columns: 80% name, 20% points */
.standings-table th:nth-child(1),
.standings-table td:nth-child(1) {
    width: 80% !important;
    text-align: left !important;
}

.standings-table th:nth-child(2),
.standings-table td:nth-child(2) {
    width: 20% !important;
    text-align: right !important;
}

/* Disable MudBlazor responsive table behavior */
.standings-table .mud-table-cell[data-label]::before {
    display: none !important;
}

.standings-table .mud-table-row {
    display: table-row !important;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid red;
}

.validation-message {
    color: red;
}

#blazor-error-ui {
    color-scheme: light only;
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.loading-progress {
    position: relative;
    display: block;
    width: 8rem;
    height: 8rem;
    margin: 20vh auto 1rem auto;
}

    .loading-progress circle {
        fill: none;
        stroke: #e0e0e0;
        stroke-width: 0.6rem;
        transform-origin: 50% 50%;
        transform: rotate(-90deg);
    }

        .loading-progress circle:last-child {
            stroke: #1b6ec2;
            stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
            transition: stroke-dasharray 0.05s ease-in-out;
        }

.loading-progress-text {
    position: absolute;
    text-align: center;
    font-weight: bold;
    inset: calc(20vh + 3.25rem) 0 auto 0.2rem;
}

    .loading-progress-text:after {
        content: var(--blazor-load-percentage-text, "Loading");
    }

code {
    color: #c02d76;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}

/* Prediction Input Styles - Optimized HTML inputs replacing MudBlazor components */
.prediction-input {
    width: 100%;
    padding: 10px 12px;
    font-size: 0.875rem;
    line-height: 1.5;
    color: rgba(0, 0, 0, 0.87);
    background-color: transparent;
    border: 1px solid rgba(0, 0, 0, 0.23);
    border-radius: 4px;
    transition: border-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    box-sizing: border-box;
    font-family: inherit;
}

.prediction-input:hover:not(:disabled) {
    border-color: rgba(0, 0, 0, 0.87);
}

.prediction-input:focus {
    outline: none;
    border-color: #594ae2;
    box-shadow: 0 0 0 2px rgba(89, 74, 226, 0.2);
}

.prediction-input:disabled {
    background-color: rgba(0, 0, 0, 0.04);
    color: rgba(0, 0, 0, 0.38);
    cursor: not-allowed;
}

.prediction-input::placeholder {
    color: rgba(0, 0, 0, 0.42);
    opacity: 1;
}

/* Dark mode styles for prediction inputs */
@media (prefers-color-scheme: dark) {
    .prediction-input {
        color: rgba(255, 255, 255, 0.87);
        border-color: rgba(255, 255, 255, 0.23);
        background-color: rgba(255, 255, 255, 0.05);
    }

    .prediction-input:hover:not(:disabled) {
        border-color: rgba(255, 255, 255, 0.87);
    }

    .prediction-input:disabled {
        background-color: rgba(255, 255, 255, 0.04);
        color: rgba(255, 255, 255, 0.38);
    }

    .prediction-input::placeholder {
        color: rgba(255, 255, 255, 0.42);
    }
}

/* MudBlazor dark mode toggle support */
.dark-mode .prediction-input {
    color: rgba(255, 255, 255, 0.87) !important;
    border-color: rgba(255, 255, 255, 0.23) !important;
    background-color: rgba(255, 255, 255, 0.05) !important;
}

.dark-mode .prediction-input:hover:not(:disabled) {
    border-color: rgba(255, 255, 255, 0.87) !important;
}

.dark-mode .prediction-input:disabled {
    background-color: rgba(255, 255, 255, 0.04) !important;
    color: rgba(255, 255, 255, 0.38) !important;
}

.dark-mode .prediction-input::placeholder {
    color: rgba(255, 255, 255, 0.42) !important;
}

/* Remove spinner buttons from number inputs */
.prediction-input::-webkit-outer-spin-button,
.prediction-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.prediction-input[type="number"] {
    -moz-appearance: textfield;
}

/* Prediction Select Styles */
.prediction-select {
    width: 100%;
    padding: 10px 32px 10px 12px;
    font-size: 0.875rem;
    line-height: 1.5;
    color: rgba(0, 0, 0, 0.87);
    background-color: transparent;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath fill='rgba(0,0,0,0.54)' d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 4px center;
    background-size: 24px;
    border: 1px solid rgba(0, 0, 0, 0.23);
    border-radius: 4px;
    transition: border-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    box-sizing: border-box;
    font-family: inherit;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

.prediction-select:hover:not(:disabled) {
    border-color: rgba(0, 0, 0, 0.87);
}

.prediction-select:focus {
    outline: none;
    border-color: #594ae2;
    box-shadow: 0 0 0 2px rgba(89, 74, 226, 0.2);
}

.prediction-select:disabled {
    background-color: rgba(0, 0, 0, 0.04);
    color: rgba(0, 0, 0, 0.38);
    cursor: not-allowed;
    opacity: 0.6;
}

/* Dark mode styles for prediction selects */
@media (prefers-color-scheme: dark) {
    .prediction-select {
        color: rgba(255, 255, 255, 0.87);
        border-color: rgba(255, 255, 255, 0.23);
        background-color: rgba(255, 255, 255, 0.05);
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath fill='rgba(255,255,255,0.54)' d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
    }

    .prediction-select:hover:not(:disabled) {
        border-color: rgba(255, 255, 255, 0.87);
    }

    .prediction-select:disabled {
        background-color: rgba(255, 255, 255, 0.04);
        color: rgba(255, 255, 255, 0.38);
    }

    /* Dropdown option styles for proper contrast */
    .prediction-select option {
        background-color: #1e1e1e;
        color: rgba(255, 255, 255, 0.87);
    }
}

/* MudBlazor dark mode toggle support */
.dark-mode .prediction-select {
    color: rgba(255, 255, 255, 0.87) !important;
    border-color: rgba(255, 255, 255, 0.23) !important;
    background-color: rgba(255, 255, 255, 0.05) !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath fill='rgba(255,255,255,0.54)' d='M7 10l5 5 5-5z'/%3E%3C/svg%3E") !important;
}

.dark-mode .prediction-select:hover:not(:disabled) {
    border-color: rgba(255, 255, 255, 0.87) !important;
}

.dark-mode .prediction-select:disabled {
    background-color: rgba(255, 255, 255, 0.04) !important;
    color: rgba(255, 255, 255, 0.38) !important;
}

/* Dropdown option styles for proper contrast in dark mode toggle */
.dark-mode .prediction-select option {
    background-color: #1e1e1e !important;
    color: rgba(255, 255, 255, 0.87) !important;
}

/* Group Position Predictions - Drag and Drop Styles */

/* Position Slot Styles */
.position-slot {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    margin-bottom: 12px;
    border: 2px dashed rgba(0, 0, 0, 0.12);
    border-radius: 8px;
    min-height: 60px;
    transition: all 0.2s ease-in-out;
    background-color: #fafafa;
}

.position-slot.empty {
    background-color: #f5f5f5;
}

.position-slot.has-team {
    background-color: #e3f2fd;
    border-style: solid;
    border-color: #2196f3;
}

.position-slot:hover {
    border-color: #594ae2;
    background-color: #f3e5f5;
}

/* Position Number Badge */
.position-number {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 50%;
    font-weight: 600;
    font-size: 1rem;
    flex-shrink: 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Team Card Styles */
.team-card {
    flex: 1;
    padding: 10px 14px;
    background-color: white;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    transition: all 0.2s ease-in-out;
}

.team-card.draggable {
    cursor: grab;
}

.team-card.draggable:active {
    cursor: grabbing;
    opacity: 0.7;
}

.team-card.draggable:hover {
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
    transform: translateY(-1px);
    border-color: #594ae2;
}

.team-card.available {
    margin-bottom: 8px;
    background-color: #fff9e6;
    border-color: #ffc107;
}

.team-card.available:hover {
    background-color: #fff3cd;
    border-color: #ff9800;
}

/* Empty Slot Text */
.empty-slot-text {
    flex: 1;
    text-align: center;
    padding: 8px;
    font-style: italic;
}

/* Available Teams Panel */
.available-teams-panel {
    background: linear-gradient(135deg, #fafafa 0%, #f5f5f5 100%);
}

/* Drag Over Effects */
.position-slot.drag-over {
    border-color: #4caf50;
    background-color: #e8f5e9;
    border-width: 3px;
}

.available-teams-panel.drag-over {
    background-color: #fff3e0;
    border: 2px dashed #ff9800;
}

/* Dark mode styles for Group Position Predictions */
@media (prefers-color-scheme: dark) {
    .position-slot {
        background-color: rgba(255, 255, 255, 0.05);
        border-color: rgba(255, 255, 255, 0.12);
    }

    .position-slot.empty {
        background-color: rgba(255, 255, 255, 0.03);
    }

    .position-slot.has-team {
        background-color: rgba(33, 150, 243, 0.15);
        border-color: #2196f3;
    }

    .position-slot:hover {
        border-color: #7c6fd6;
        background-color: rgba(89, 74, 226, 0.1);
    }

    .team-card {
        background-color: rgba(255, 255, 255, 0.08);
        border-color: rgba(255, 255, 255, 0.23);
        color: rgba(255, 255, 255, 0.87);
    }

    .team-card.draggable:hover {
        border-color: #7c6fd6;
        background-color: rgba(255, 255, 255, 0.12);
    }

    .team-card.available {
        background-color: rgba(255, 193, 7, 0.15);
        border-color: #ffc107;
    }

    .team-card.available:hover {
        background-color: rgba(255, 152, 0, 0.2);
        border-color: #ff9800;
    }

    .available-teams-panel {
        background: rgba(255, 255, 255, 0.03);
    }

    .empty-slot-text {
        color: rgba(255, 255, 255, 0.5);
    }

    .position-slot.drag-over {
        background-color: rgba(76, 175, 80, 0.2);
    }

    .available-teams-panel.drag-over {
        background-color: rgba(255, 152, 0, 0.15);
    }
}

/* MudBlazor dark mode toggle support for Group Position Predictions */
.dark-mode .position-slot {
    background-color: rgba(255, 255, 255, 0.05) !important;
    border-color: rgba(255, 255, 255, 0.12) !important;
}

.dark-mode .position-slot.empty {
    background-color: rgba(255, 255, 255, 0.03) !important;
}

.dark-mode .position-slot.has-team {
    background-color: rgba(33, 150, 243, 0.15) !important;
    border-color: #2196f3 !important;
}

.dark-mode .position-slot:hover {
    border-color: #7c6fd6 !important;
    background-color: rgba(89, 74, 226, 0.1) !important;
}

.dark-mode .team-card {
    background-color: rgba(255, 255, 255, 0.08) !important;
    border-color: rgba(255, 255, 255, 0.23) !important;
    color: rgba(255, 255, 255, 0.87) !important;
}

.dark-mode .team-card.draggable:hover {
    border-color: #7c6fd6 !important;
    background-color: rgba(255, 255, 255, 0.12) !important;
}

.dark-mode .team-card.available {
    background-color: rgba(255, 193, 7, 0.15) !important;
    border-color: #ffc107 !important;
}

.dark-mode .team-card.available:hover {
    background-color: rgba(255, 152, 0, 0.2) !important;
    border-color: #ff9800 !important;
}

.dark-mode .available-teams-panel {
    background: rgba(255, 255, 255, 0.03) !important;
}

.dark-mode .empty-slot-text {
    color: rgba(255, 255, 255, 0.5) !important;
}

.dark-mode .position-slot.drag-over {
    background-color: rgba(76, 175, 80, 0.2) !important;
}

.dark-mode .available-teams-panel.drag-over {
    background-color: rgba(255, 152, 0, 0.15) !important;
}
/* Bottom Navigation Bar Styles - Match AppBar colors */
.bottom-nav-bar,
.bottom-nav-bar.mud-paper,
.bottom-nav-bar.mud-elevation-8 {
    background-color: #022C22 !important;  /* Deep Green - same as AppBar Light Mode */
    border-top: 2px solid rgba(212, 175, 55, 0.5) !important;  /* Gold border */
    transition: background-color 0.3s ease;
}

/* Dark mode support for bottom navigation */
@media (prefers-color-scheme: dark) {
    .bottom-nav-bar,
    .bottom-nav-bar.mud-paper,
    .bottom-nav-bar.mud-elevation-8 {
        background-color: #011A14 !important;  /* Ultra-deep green - same as AppBar Dark Mode */
        border-top: 2px solid rgba(225, 193, 110, 0.5) !important;  /* Lighter Gold border */
    }
}

.dark-mode .bottom-nav-bar,
.dark-mode .bottom-nav-bar.mud-paper,
.dark-mode .bottom-nav-bar.mud-elevation-8 {
    background-color: #011A14 !important;  /* Ultra-deep green */
    border-top: 2px solid rgba(225, 193, 110, 0.5) !important;
}

/* Bottom navigation button styles */
.bottom-nav-bar .mud-button-root {
    padding: 4px 8px !important;
    text-transform: none !important;
    color: #D4AF37 !important;  /* Gold text - same as AppBar */
}

.bottom-nav-bar .mud-button-root:hover {
    background-color: rgba(212, 175, 55, 0.1) !important;  /* Gold hover effect */
}

/* Active button styling */
.bottom-nav-bar .mud-button-root.mud-primary {
    color: #D4AF37 !important;  /* Gold for active button */
    font-weight: 600 !important;  /* Bold for active */
}

.bottom-nav-bar .mud-icon-root {
    margin: 0 !important;
    color: inherit !important;
}

.bottom-nav-bar .mud-typography-caption {
    font-size: 0.625rem !important;
    line-height: 1.2 !important;
    white-space: nowrap;
    color: inherit !important;
}

/* Dark mode - lighter gold for better contrast */
@media (prefers-color-scheme: dark) {
    .bottom-nav-bar .mud-button-root {
        color: #E1C16E !important;  /* Lighter Gold for dark mode - same as AppBar */
    }

    .bottom-nav-bar .mud-button-root.mud-primary {
        color: #E1C16E !important;  /* Lighter Gold for dark mode */
        font-weight: 600 !important;
    }
}

.dark-mode .bottom-nav-bar .mud-button-root {
    color: #E1C16E !important;
}

.dark-mode .bottom-nav-bar .mud-button-root.mud-primary {
    color: #E1C16E !important;
    font-weight: 600 !important;
}

/* Hide bottom nav on larger screens (optional - remove if you want it on desktop too) */
@media (min-width: 960px) {
    .bottom-nav-bar {
        display: none;
    }
}

/* Drawer (Navigation Menu) Styles - Force green background */
.mud-drawer {
    background-color: #022C22 !important;  /* Deep Green - Light Mode */
}

.mud-drawer .mud-navmenu {
    background-color: transparent !important;
}

.mud-drawer .mud-nav-link {
    color: #F8F9FA !important;  /* Light text on dark green */
}

.mud-drawer .mud-nav-link:hover {
    background-color: rgba(212, 175, 55, 0.1) !important;  /* Gold hover */
}

.mud-drawer .mud-nav-link-text {
    color: #F8F9FA !important;
}

.mud-drawer .mud-icon-root {
    color: #D4AF37 !important;  /* Gold icons */
}

.mud-drawer .mud-typography {
    color: #F8F9FA !important;  /* Light text for labels */
}

/* Dark mode drawer */
@media (prefers-color-scheme: dark) {
    .mud-drawer {
        background-color: #011A14 !important;  /* Ultra-deep green - Dark Mode */
    }
    
    .mud-drawer .mud-icon-root {
        color: #E1C16E !important;  /* Lighter Gold icons */
    }
}

.dark-mode .mud-drawer {
    background-color: #011A14 !important;
}

.dark-mode .mud-drawer .mud-icon-root {
    color: #E1C16E !important;
}

/* Responsive Bottom Navigation Container */
.bottom-nav-container {
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 8px 4px;
    width: 100%;
    max-width: 100%;
    gap: 4px;
}

/* Bottom Navigation Button - Responsive */
.bottom-nav-button {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    flex: 1 1 0;
    max-width: 25%;
    min-width: 0;
    padding: 4px 2px !important;
    overflow: hidden;
}

/* Bottom Navigation Item Container */
.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    width: 100%;
}

/* Bottom Navigation Text - Responsive */
.bottom-nav-text {
    font-size: 0.65rem;
    line-height: 1.1;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    display: block;
}

/* Responsive adjustments for different screen sizes */

/* Very small screens (< 360px) - Smallest phones */
@media (max-width: 359px) {
    .bottom-nav-container {
        gap: 2px;
        padding: 6px 2px;
    }

    .bottom-nav-button {
        padding: 3px 1px !important;
    }

    .bottom-nav-text {
        font-size: 0.55rem;
    }

    /* Smaller icons on very small screens */
    .bottom-nav-item .mud-icon-root {
        font-size: 1.25rem !important;
    }
}

/* Small screens (360px - 400px) - Most budget phones */
@media (min-width: 360px) and (max-width: 400px) {
    .bottom-nav-text {
        font-size: 0.6rem;
    }
}

/* Medium-small screens (401px - 480px) - Standard phones */
@media (min-width: 401px) and (max-width: 480px) {
    .bottom-nav-text {
        font-size: 0.65rem;
    }
}

/* Medium screens (481px - 600px) - Large phones */
@media (min-width: 481px) and (max-width: 600px) {
    .bottom-nav-container {
        gap: 8px;
        padding: 10px 8px;
    }

    .bottom-nav-button {
        padding: 6px 4px !important;
    }

    .bottom-nav-text {
        font-size: 0.7rem;
    }
}

/* Larger screens (> 600px) - Tablets and up */
@media (min-width: 601px) {
    .bottom-nav-container {
        gap: 12px;
        padding: 10px 12px;
    }

    .bottom-nav-button {
        padding: 8px 8px !important;
        max-width: 120px;
    }

    .bottom-nav-text {
        font-size: 0.75rem;
        white-space: normal;
    }
}
