body {
    font-size: 1.2rem;
}

/* Increase font-weight for form labels in multiway and calculator tools */
.col-form-label {
    font-weight: 600;
}

/* Ensure modal dialogs appear above sticky header */
.modal {
    z-index: 10000 !important;
}

.modal-backdrop {
    z-index: 9999 !important;
}

/* Ensure BaseUI modals (session tracker) appear above sticky header */
div[data-baseweb="modal"] {
    z-index: 10000 !important;
}

[v-cloak] {
    display: none;
}

#navbar .navbar-brand,
#footer .footer-brand {
    font-family: 'Holtwood One SC', serif;
}


#navbar .navbar-brand {
    font-size: 32px;
}

#footer {
    background-color: black;
    color: #fbef28;
    width: 100%;
    border-top: 1px solid #222;
    font-size: 1rem;
    position: relative;
    margin-top: auto;
}

#footer .footer-brand {
    font-size: 20px;
}

#footer .help-link,
#footer .footer-brand,
#footer .copyright {
    line-height: 32px;
    vertical-align: middle;
}

#navbar,
#navbar .dropdown-menu {
    background-color: black;
}

#footer .help-link,
#navbar .navbar-brand,
#navbar .nav-link,
#navbar .dropdown-menu .dropdown-item {
    color: #fbef28;
}

#navbar .dropdown-menu .dropdown-item {
    color: #000;
}

span.nav-link {
    cursor: pointer;
}

#navbar .dropdown-item.active,
#navbar .dropdown-item:active {
    background-color: #606060;
}

#navbar .dropdown-item:hover,
#navbar .dropdown-item:focus {
    background-color: #808080;
}

#navbar .nav-link {
    font-size: 20px;
}

#navbar .nav-item.active {
    border-bottom: 1px solid #fbef28;
}

.secondary-menu-nav-link {
    display: flex;
    align-items: center;
    color: #000 !important;
    cursor: pointer;
}

.secondary-menu-nav-link .fa,
.secondary-menu-nav-link .username {
    margin-right: 10px;
}

.secondary-menu-nav-link .fa {
    margin-right: 8px;
    color: #000 !important;
}

.navigation-btn {
    font-size: 1.4rem;
}

.welcome-background {
    background-color: #fbef28;
}

.pm-hand {
    line-height: 0;
    display: inline-flex;
    gap: 4px;
    flex-wrap: nowrap;
    min-width: fit-content;
}

.pm-card {
    display: inline-flex;
    align-items: flex-end;
    justify-content: center;
    width: 52px;
    height: 68px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-weight: bold;
    font-size: 14px;
    position: relative;
    overflow: hidden;
    padding-bottom: 8px;
    flex-shrink: 0;  /* Prevent cards from shrinking */
}

.pm-card::before {
    content: attr(data-rank);
    position: absolute;
    top: 4px;
    left: 6px;
    font-size: 22px;
    line-height: 1;
    font-weight: bold;
    color: white; /* Make all ranks white */
}

.pm-card::after {
    font-family: Arial, sans-serif;
    font-size: 36px;
    line-height: 1;
    color: white; /* Make all suits white */
}

/* Suit colors and symbols */
.pm-card.suit-h {
    background-color: #bf1814;
    color: white;
}
.pm-card.suit-h::after {
    content: "♥";
    color: white;
}

.pm-card.suit-d {
    background-color: #0088c2;
    color: white;
}
.pm-card.suit-d::after {
    content: "♦";
    color: white;
}

.pm-card.suit-c {
    background-color: #21aa2a;
    color: white;
}
.pm-card.suit-c::after {
    content: "♣";
    color: white;
}

.pm-card.suit-s {
    background-color: #4f4f4f;
    color: white;
}
.pm-card.suit-s::after {
    content: "♠";
    color: white;
}

/* Suitless card (?) styling */
.pm-card.suit-\? {
    background-color: #ffc107;
    color: white;
    border: 2px solid #e0a800;
}
.pm-card.suit-\?::after {
    content: "?";
    color: white;
    font-weight: bold;
    font-size: 28px;
}

/* Rankless card styling */
.pm-card.rank-\? {
    position: relative;
}

/* Rankless card with known suit */
.pm-card.rank-\?.suit-h {
    background-color: #bf1814;
    color: white;
}
.pm-card.rank-\?.suit-h::before {
    content: "?";
    color: white;
    font-size: 18px;
}
.pm-card.rank-\?.suit-h::after {
    content: "♥";
    color: white;
}

.pm-card.rank-\?.suit-d {
    background-color: #0088c2;
    color: white;
}
.pm-card.rank-\?.suit-d::before {
    content: "?";
    color: white;
    font-size: 18px;
}
.pm-card.rank-\?.suit-d::after {
    content: "♦";
    color: white;
}

.pm-card.rank-\?.suit-c {
    background-color: #21aa2a;
    color: white;
}
.pm-card.rank-\?.suit-c::before {
    content: "?";
    color: white;
    font-size: 18px;
}
.pm-card.rank-\?.suit-c::after {
    content: "♣";
    color: white;
}

.pm-card.rank-\?.suit-s {
    background-color: #4f4f4f;
    color: white;
}
.pm-card.rank-\?.suit-s::before {
    content: "?";
    color: white;
    font-size: 18px;
}
.pm-card.rank-\?.suit-s::after {
    content: "♠";
    color: white;
}

/* Completely unknown card (??) */
.pm-card.rank-\?.suit-\? {
    background-color: #fd7e14;
    border: 2px solid #e8590c;
}
.pm-card.rank-\?.suit-\?::before {
    content: "?";
    color: white;
    font-size: 18px;
    top: 4px;
    left: 6px;
}
.pm-card.rank-\?.suit-\?::after {
    content: "?";
    color: white;
    font-size: 28px;
}

/* Empty card */
.rank-r.suit-x {
    background-color: #f8f9fa;
    border-style: dashed;
}

.rank-r.suit-x::before,
.rank-r.suit-x::after {
    content: "";
}

/* Remove old sprite-based styles */
.pm-card {
    background-image: none;
    background-size: auto;
}

[class*="rank-"] {
    background-position-x: 0;
}

/* Styles for the mobile button */

#navbar .navbar-toggler {
    border-color: #fbef28;
}

/*.navbar-dark .navbar-toggler-icon {
    background-image: url("data:image/svg+xml;charset=utf8,%3Csvg viewBox='0 0 30 30' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath stroke='%23fbef28' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E");
}*/

/* Invalid card */
.pm-card.invalid {
    background-color: #e9ecef;
    border: 2px solid #ced4da;
}

.pm-card.invalid::before {
    content: "";
}

.pm-card.invalid::after {
    content: "✕";
    color: #6c757d;
    font-size: 40px;
    font-weight: bold;
}

#navbar .navbar-nav {
    margin-left: 2rem;
}

#navbar .nav-item {
    margin-right: 1.5rem;
    position: relative;
}

#navbar .nav-link {
    font-size: 20px;
    padding: 0.5rem 0;
    transition: all 0.2s ease;
}

#navbar .nav-item.active {
    border-bottom: 2px solid #fbef28;
}

#navbar .nav-item.active .nav-link {
    font-weight: 500;
}

#navbar .dropdown-menu {
    margin-top: 0.5rem;
    border-radius: 4px;
    border: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

#navbar .dropdown-item {
    padding: 0.6rem 1.2rem;
    font-size: 16px;
    transition: all 0.2s ease;
}

#navbar .dropdown-item:hover,
#navbar .dropdown-item:focus {
    background-color: #2a2a2a;
}

#navbar .dropdown-item.active,
#navbar .dropdown-item:active {
    background-color: #3a3a3a;
}

#navbar .dropdown-item .badge {
    font-size: 0.7rem;
    padding: 0.25em 0.6em;
    background-color: #ffc107;
    color: #000;
    font-weight: 500;
    border-radius: 3px;
    vertical-align: middle;
}

/* Sidebar styles */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    height: 100vh;
    width: 260px;
    min-width: 60px;
    background-color: black;
    color: #fbef28;
    transition: width 0.2s;
    z-index: 1300;
    padding: 0;
    margin: 0;
    border: none;
}
.sidebar.collapsed {
    width: 60px;
}
.sidebar-header {
    padding: 1.5rem 1rem 1rem 1rem;
    width: 100%;
    box-sizing: border-box;
}
.navbar-brand {
    color: #fbef28 !important;
    font-family: 'Holtwood One SC', serif !important;
    font-size: 2rem !important;
    letter-spacing: 1px;
    padding: 0.5rem 0 0.5rem 0;
    margin: 0;
    line-height: 1.5;
    max-width: 100%;
    overflow: hidden;
    word-break: break-word;
    white-space: normal;
    display: block;
    box-sizing: border-box;
    width: 100%;
    text-align: center;
}
@media (max-width: 400px) {
    .navbar-brand {
        font-size: 1.2rem !important;
    }
}
#sidebarCollapse {
    color: #222 !important;
    font-size: 2rem;
    margin-left: 0.5rem;
    background: none;
    border: none;
    outline: none;
    display: flex;
    align-items: center;
    text-decoration: none !important;
}
#sidebarCollapse:hover,
#sidebarCollapse:focus,
#sidebarCollapse:active {
    color: #222 !important;
    background: none !important;
    border: none !important;
    outline: none !important;
    text-decoration: none !important;
    box-shadow: none !important;
    border-bottom: none !important;
}
.menu-section {
    margin-bottom: 1.5rem;
}
.menu-section-title {
    color: #eee !important;
    font-size: 0.85rem;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
    padding-left: 1rem;
}
.sidebar .navbar-nav {
    width: 100%;
    padding: 0;
    margin: 0;
}
.sidebar .nav-item {
    width: 100%;
}
.sidebar .nav-link {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    width: 100%;
    text-align: left;
    color: #fbef28;
    border-radius: 0 20px 20px 0;
    transition: background 0.2s, color 0.2s;
    white-space: nowrap;
    overflow: hidden;
    font-size: 1.2rem;
    font-weight: 600;
    position: relative;
}
.sidebar .nav-link .menu-text {
    margin-left: 1rem;
    transition: opacity 0.2s, width 0.2s;
    display: inline-block;
    min-width: 0;
    font-size: inherit;
    font-weight: inherit;
}
.sidebar.collapsed .nav-link .menu-text {
    opacity: 1;
    width: 1.2em !important;
    text-align: center;
    overflow: hidden !important;
    margin-left: 0.2em;
    font-weight: bold;
    font-size: 1.1em;
}
.sidebar.collapsed .nav-link .menu-text:after {
    content: attr(data-first-letter);
    display: inline;
}
.sidebar.collapsed .nav-link .menu-text {
    /* Only show the first letter */
    font-size: 1.1em;
}
.sidebar .nav-link:hover, .sidebar .nav-item.active .nav-link {
    background-color: #000;
    color: #fff;
}
.sidebar .nav-link i {
    min-width: 24px;
    text-align: center;
    font-size: 1.3rem;
}

/* Style Programs icon image to match FontAwesome icons */
.sidebar .nav-link img {
    min-width: 24px;
    width: 24px;
    height: 24px;
    text-align: center;
    filter: brightness(0) saturate(100%) invert(88%) sepia(70%) saturate(486%) hue-rotate(4deg) brightness(105%) contrast(98%);
    transition: filter 0.2s;
}

.sidebar .nav-link:hover img, 
.sidebar .nav-item.active .nav-link img {
    filter: brightness(0) saturate(100%) invert(100%);
}
.sidebar .badge {
    font-size: 0.65rem;
    margin-left: 0.3rem;
    position: absolute;
    top: 0.3rem;
    right: 1.2rem;
    line-height: 1;
    padding: 0.2em 0.4em;
}
.sidebar .nav-link .menu-text, .menu-section-title {
    font-family: inherit, sans-serif !important;
}
/* Main content area */
#main-content {
    margin-left: 260px;
    transition: margin-left 0.2s;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    padding: 0;
}
.sidebar.collapsed ~ #main-content {
    margin-left: 60px;
}
#user-menu-bar {
    min-height: 56px;
    background: transparent;
    margin-left: auto;
}
.secondary-menu-nav-link {
    display: flex;
    align-items: center;
    color: #000;
    cursor: pointer;
}
.secondary-menu-nav-link .fa {
    margin-right: 8px;
}
.username {
    font-weight: 600;
}
/* Footer styles */
#footer .footer-brand {
    font-size: 1.2rem;
    font-family: 'Holtwood One SC', serif;
}
#footer .help-link {
    color: #fbef28;
    text-decoration: underline;
}
#footer .help-link:hover {
    color: #fff;
}
@media (max-width: 991.98px) {
    .sidebar {
        width: 60px !important;
        min-width: 60px !important;
        left: 0;
        top: 0;
        height: 100vh;
        z-index: 1300;
    }
    
    /* Force collapsed state on mobile even without .collapsed class */
    .sidebar .navbar-brand,
    .sidebar .menu-section-title,
    .sidebar .badge,
    .sidebar .nav-link .menu-text {
        display: none !important;
    }
    
    /* Show collapsed logo on mobile */
    .sidebar .sidebar-logo-collapsed {
        display: block !important;
    }
    
    .sidebar.collapsed {
        width: 60px !important;
        min-width: 60px !important;
    }
    .sidebar.collapsed .navbar-brand,
    .sidebar.collapsed .menu-section-title,
    .sidebar.collapsed .badge,
    .sidebar.collapsed .nav-link .menu-text {
        display: none !important;
    }
    #main-content {
        margin-left: 60px !important;
    }
    body.welcome-background #main-content {
        margin-left: 0 !important;
    }
}
.sidebar.collapsed .navbar-brand {
    display: none !important;
}
.sidebar.collapsed .menu-section-title {
    display: none !important;
}
.sidebar.collapsed .badge {
    display: none !important;
}
/* Optionally, show a single-letter logo when collapsed */
.sidebar-logo-collapsed {
    display: none;
    color: #fbef28;
    font-family: 'Holtwood One SC', serif;
    font-size: 2rem;
    text-align: center;
    width: 100%;
    margin: 0.5rem 0 0.5rem 0;
}
.sidebar.collapsed .sidebar-logo-collapsed {
    display: block;
}

.sticky-header {
    position: sticky;
    top: 0;
    z-index: 1100;
}

.main-topbar {
    background-color: whitesmoke;
    width: 100%;
    min-height: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #d6d6d6;
    margin: 0;
    padding: 0 1rem;
}

/* Black header for unauthenticated users */
.main-topbar.unauthenticated-header {
    background: #000 !important;
    justify-content: center !important;
}

#main-content > main {
    margin-top: 0;
    padding: 2rem 0 2rem 0;
    background: #fff;
    color: #222;
    flex-grow: 1;
}

/* Game Selector Tabs */
.game-selector-tabs {
    display: flex;
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    overflow-x: auto;
}

.game-tab {
    display: inline-block;
    padding: 12px 20px;
    background: none;
    border: none;
    border-radius: 6px;
    color: #666;
    font-weight: 500;
    font-size: 0.95rem;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
    white-space: nowrap;
    min-width: fit-content;
    outline: none;
}

.game-tab:focus {
    outline: none;
    box-shadow: none;
}

.game-tab:hover {
    background-color: #f0e6f7;
    color: #6c757d;
    text-decoration: none;
}

.game-tab.active {
    background-color: #af1ada;
    color: white;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(175,26,218,0.3);
}

.game-tab.disabled {
    color: #adb5bd;
    cursor: not-allowed;
}

.game-tab.disabled:hover {
    background: none;
    color: #adb5bd;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .game-selector-tabs {
        padding: 2px;
    }
    
    .game-tab {
        padding: 10px 16px;
        font-size: 0.9rem;
    }
}

#user-menu-bar .dropdown-menu {
    min-width: 320px !important;
    padding: 1.5rem 1.25rem !important;
    font-size: 1.1rem !important;
}

.user-dropdown-menu {
    min-width: 320px !important;
    padding: 0.5rem 0 !important;
    font-size: 1.1rem !important;
}
.user-dropdown-header {
    padding: 1.25rem 1rem 0.75rem 1rem;
    text-align: center;
}
.user-avatar {
    width: 56px;
    height: 56px;
    background: #af1ada;
    color: #fff;
    font-size: 2rem;
    font-weight: 600;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.5rem auto;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.user-name {
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 0.1rem;
}
.user-email {
    font-size: 0.95rem;
    color: #666;
    margin-bottom: 0.5rem;
    word-break: break-all;
}
.user-dropdown-menu .dropdown-item {
    padding-left: 1.25rem !important;
    padding-right: 1.25rem !important;
}

.sidebar-toggle-bottom {
    position: relative;
    margin-top: auto;
    margin-bottom: 1rem;
    background: #000;
    color: #fbef28;
    border: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: background 0.2s, color 0.2s;
    z-index: 1100;
}
.sidebar-toggle-bottom:hover, .sidebar-toggle-bottom:focus {
    background: #222;
    color: #fff;
}
.sidebar.collapsed .sidebar-toggle-bottom #sidebarCollapseIcon {
    transform: rotate(180deg);
    transition: transform 0.2s;
}
.sidebar-toggle-bottom #sidebarCollapseIcon svg {
    transition: transform 0.2s;
}
.sidebar.collapsed .sidebar-toggle-bottom #sidebarCollapseIcon svg {
    transform: rotate(180deg) scaleX(-1);
}
.sidebar-toggle-bottom #sidebarCollapseIcon .arrow-left {
    display: inline;
}
.sidebar-toggle-bottom #sidebarCollapseIcon .arrow-right {
    display: none;
}
.sidebar.collapsed .sidebar-toggle-bottom #sidebarCollapseIcon .arrow-left {
    display: none;
}
.sidebar.collapsed .sidebar-toggle-bottom #sidebarCollapseIcon .arrow-right {
    display: inline;
}
@media (max-width: 991.98px) {
    .sidebar-toggle-bottom {
        display: none !important;
    }
}

/* Ensure tooltips appear above the header */
.tooltip {
    z-index: 1100 !important;
}

