      /* Deck cards */
      .deck-card img {
        transition: transform 0.2s ease;
      }

      /* -------------------------------
         Life-Tracker Defaults (Desktop)
         ------------------------------- */
      body {
        /* background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); */
        min-height: 100vh;
        min-height: 100dvh;
        margin: 0;
        padding: 0;
        overflow-x: hidden;
        overflow-y: auto;
        padding-top: env(safe-area-inset-top, 1.5rem);
      }
      .life-tracker-container {
        min-height: 100vh;
        min-height: 100dvh;
        padding: 1rem;
        background: transparent;
      }
      .back-btn {
        position: fixed;
        top: 1rem;
        left: 1rem;
        z-index: 1000;
        background: rgba(255, 255, 255, 0.9);
        border: none;
        border-radius: 50px;
        padding: 0.75rem 1.5rem;
        font-weight: 600;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
        transition: all 0.2s ease;
      }
      .back-btn:hover {
        background: white;
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
      }

      /* -------------------------------
         Mobile Full-Screen Fix
         ------------------------------- */
      @media (max-width: 1024px) {
        html, body {
          height: 100%;
          margin: 0;
          padding: 0;
        }

        .life-tracker-container {
          position: fixed;
          inset: 0;
          padding: 0.5rem;
          overflow-y: auto;
          background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
          padding-top: env(safe-area-inset-top, 1.5rem);
          padding-bottom: env(safe-area-inset-bottom);
          /* optional left/right for landscape */
          padding-left: env(safe-area-inset-left);
          padding-right: env(safe-area-inset-right);
        }

        .back-btn {
          top: 0.5rem !important;
          left: 0.5rem !important;
        }
      }

      /* -------------------------------
         Center-based 180° Rotation
         ------------------------------- */
      .player-card.rotated {
        transform: rotate(180deg);
        transform-origin: center center;
      }
      .player-card.rotated .player-header,
      .player-card.rotated .card-body {
        transform: rotate(180deg);
        transform-origin: center center;
      }

      /* -------------------------------
         Card / Table View Transitions
         ------------------------------- */
      #card-view,
      #table-view {
        opacity: 0;
        transition: opacity 0.25s ease;
      }
      #card-view.show,
      #table-view.show {
        opacity: 1;
      }

      /* -------------------------------
         Record Game Styles
         ------------------------------- */
      .card {
        background-size: cover;
        background-position: center;
        background-repeat: no-repeat;
      }
      .text-shadow {
        text-shadow: 0 1px 3px rgba(0, 0, 0, 0.75);
      }
      .bg-deck {
        background-size: cover;
        background-repeat: no-repeat;
        background-position-x: center;
        background-position-y: -10px;
        /* overflow: hidden; */
      }
      .card-content {
        position: relative;
        z-index: 2;
      }
      .card-overlay {
        position: absolute;
        z-index: 2;
        background: rgba(255, 255, 255, 0.7);
        transition: background 0.3s ease;
        pointer-events: none;
      }
      .card.winner-animate {
        animation: winnerPulse 0.4s ease;
      }
      @keyframes winnerPulse {
        0% {
          transform: scale(1);
          box-shadow: 0 0 0 rgba(19,185,85, 0);
        }
        50% {
          transform: scale(1.015);
          box-shadow: 0 0 20px rgba(19,185,85, 0.5);
        }
        100% {
          transform: scale(1);
          box-shadow: 0 0 0 rgba(19,185,85, 0);
        }
      }
      .deck-card {
        display: flex;
        flex-direction: column;
      }
      .deck-owner-info {
        bottom: 35px !important;
      }
      /* -------------------------------
         Header Nav & Dropdowns
         ------------------------------- */
      .custom-dropdown {
        background-color: #fff !important;
        color: #212529 !important;
        border: 1px solid #ddd;
        z-index: 9999;
      }
      .custom-dropdown .dropdown-item {
        color: #212529 !important;
      }
      .custom-dropdown .dropdown-item:hover {
        background-color: #ffdeb1 !important;
      }
      .nav-pills .nav-link.active {
        font-weight: bold;
        background-color: #a075e1;
        color: #fff;
      }

      /* -------------------------------
         Achievement Badges
         ------------------------------- */
      .achievements-badges {
        display: flex;
        flex-wrap: wrap;
        gap: 12px;
        padding: 8px;
        justify-content: start;
      }
      .achievement-badge {
        width: 64px;
        height: 64px;
        background-size: cover;
        background-position: center;
        position: relative;
        border-radius: 8px;
        flex-shrink: 0;
        transition: transform 0.2s ease;
      }
      .achievement-badge:hover {
        transform: scale(1.1);
        z-index: 2;
      }
      .achievement-badge-text {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        font-size: 1.5rem;
        font-weight: bold;
        color: white;
        text-shadow:
          -1px -1px 0 #000,
          1px -1px 0 #000,
          -1px  1px 0 #000,
          1px  1px 0 #000;
      }

      /* Quadrant Layout for 4-6 Players */
      .quadrant-layout {
        width: 100vw;
        height: 100vh;
        min-height: 100dvh;
        overflow: hidden;
        background: #222;
        position: relative;
      }
      .quadrant-grid {
        display: grid;
        width: 100vw;
        height: 100vh;
        min-height: 100dvh;
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(2, 1fr);
        gap: 0;
        position: absolute;
        top: 0; left: 0; right: 0; bottom: 0;
      }
      .quadrant-grid.players-3 {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(2, 1fr);
      }
      .quadrant-grid.players-3 .q2 { 
        grid-area: 2 / 1 / 3 / 3; 
      }
      /* Ensure proper grid positioning for 3 players */
      .quadrant-grid.players-3 .q0 { grid-area: 1 / 1 / 2 / 2; }
      .quadrant-grid.players-3 .q1 { grid-area: 1 / 2 / 2 / 3; }
      .quadrant-grid.players-4 {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(2, 1fr);
      }
      /* Ensure proper grid positioning for 4 players */
      .quadrant-grid.players-4 .q0 { grid-area: 1 / 1 / 2 / 2; }
      .quadrant-grid.players-4 .q1 { grid-area: 1 / 2 / 2 / 3; }
      .quadrant-grid.players-4 .q2 { grid-area: 2 / 1 / 3 / 2; }
      .quadrant-grid.players-4 .q3 { grid-area: 2 / 2 / 3 / 3; }
      .quadrant-grid.players-5 {
        grid-template-columns: repeat(3, 1fr);
        grid-template-rows: repeat(2, 1fr);
      }
      .quadrant-grid.players-5 .q2 { 
        grid-area: 2 / 2 / 3 / 3; 
      }
      /* Ensure proper grid positioning for 5 players */
      .quadrant-grid.players-5 .q0 { grid-area: 1 / 1 / 2 / 2; }
      .quadrant-grid.players-5 .q1 { grid-area: 1 / 2 / 2 / 3; }
      .quadrant-grid.players-5 .q3 { grid-area: 2 / 1 / 3 / 2; }
      .quadrant-grid.players-5 .q4 { grid-area: 2 / 3 / 3 / 4; }
      .quadrant-grid.players-6 {
        grid-template-columns: repeat(3, 1fr);
        grid-template-rows: repeat(3, 1fr);
      }
      /* Ensure proper grid positioning for 6 players */
      .quadrant-grid.players-6 .q0 { grid-area: 1 / 1 / 2 / 2; }
      .quadrant-grid.players-6 .q1 { grid-area: 1 / 2 / 2 / 3; }
      .quadrant-grid.players-6 .q2 { grid-area: 1 / 3 / 2 / 4; }
      .quadrant-grid.players-6 .q3 { grid-area: 2 / 1 / 3 / 2; }
      .quadrant-grid.players-6 .q4 { grid-area: 2 / 2 / 3 / 3; }
      .quadrant-grid.players-6 .q5 { grid-area: 2 / 3 / 3 / 4; }
      .quadrant {
        display: flex;
        align-items: center;
        justify-content: center;
        position: relative;
        border: 2px solid #111;
        overflow: hidden;
        min-width: 0;
        min-height: 0;
        padding: 0;
      }
      /* Distinct background colors for each quadrant */
      .q0 { background: #e09f5b; }
      .q1 { background: #a77ff7; }
      .q2 { background: #f76e6c; }
      .q3 { background: #5fbb97; }
      .q4 { background: #6ec6f7; }
      .q5 { background: #f7d06e; }
      /* Rotate top row for across-the-table play */
      .q0, .q1 { transform: rotate(180deg); }
      .q2, .q3, .q4, .q5 { transform: none; }
      
      /* For 6 players, rotate the entire top row (q0, q1, q2) */
      .quadrant-grid.players-6 .q0,
      .quadrant-grid.players-6 .q1,
      .quadrant-grid.players-6 .q2 { transform: rotate(180deg); }
      .quadrant-grid.players-6 .q3,
      .quadrant-grid.players-6 .q4,
      .quadrant-grid.players-6 .q5 { transform: none; }
      
      .quadrant-inner {
        width: 100%;
        height: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: 0;
      }
      .life-display {
        font-size: 9vw;
        font-weight: bold;
        color: #fff;
      
        /* 1) Real text‐stroke (Chrome, Safari—and now supported unprefixed in FF) */
        -webkit-text-stroke: 2px #000;
        text-stroke: 2px #000;
      
        /* 2) Fallback "outline" via text‐shadow (for browsers that ignore text-stroke) */
        text-shadow:
           /* 4 shadows to outline at each corner */
           -2px -2px 0 #000,
            2px -2px 0 #000,
           -2px  2px 0 #000,
            2px  2px 0 #000,
           /* your existing soft drop-shadow */
            0    2px 8px rgba(0, 0, 0, 0.25);
      
        margin-bottom: 0.5em;
        letter-spacing: 2px;
      }
      .life-controls {
        display: flex;
        gap: 2vw;
        margin: 0.5em 0 0.5em 0;
        justify-content: center;
      }
      .life-btn {
        font-size: 4vw;
        width: 3.5em;
        height: 3.5em;
        border-radius: 50%;
        border: none;
        background: transparent !important;
        color: #222;
        box-shadow: none !important;
        font-weight: bold;
        transition: background 0.2s, color 0.2s, transform 0.1s;
        outline: none;
        display: flex;
        align-items: center;
        justify-content: center;
      }
      .life-btn:active {
        background: #222;
        color: #fff;
        transform: scale(0.95);
      }
      .player-label {
        margin-top: 2em;
        font-size: 2vw;
        color: #fff;
        font-weight: 600;
        text-align: center;
        text-shadow: 0 2px 8px rgba(0,0,0,0.25);
        letter-spacing: 0.5px;
      }
      /* Responsive font for mobile */
          @media (max-width: 600px) {
        .life-display { font-size: 2.2rem; }
        .life-btn { font-size: 1.5rem; width: 2.2rem; height: 2.2rem; }
        .player-label { font-size: 1rem; }
        
        /* Adjust player label badge for mobile */
        .commander-damage-badge[id^="player_label_badge_"] {
            font-size: 1rem;
            padding: 0.2em 0.4em;
        }
    }
      /* Hide empty quadrants if <4 players */
      .quadrant.empty { display: none; }
      
      /* Deck image background functionality */
      .quadrant.deck-image-background {
        background-size: cover !important;
        background-position: top !important;
        background-repeat: no-repeat !important;
        background-color: transparent !important;
      }
      
      /* Override quadrant background colors when deck image is active */
      .quadrant.deck-image-background.q0,
      .quadrant.deck-image-background.q1,
      .quadrant.deck-image-background.q2,
      .quadrant.deck-image-background.q3,
      .quadrant.deck-image-background.q4,
      .quadrant.deck-image-background.q5 {
        background-color: transparent !important;
      }
      
      .quadrant.deck-image-background .quadrant-inner {
        background: rgba(255, 255, 255, 0.4) !important;
        backdrop-filter: blur(1px);
        -webkit-backdrop-filter: blur(1px);
      }
      
      /* Ensure the white overlay doesn't interfere with controls */
      .quadrant.deck-image-background .quadrant-inner {
        pointer-events: none;
      }
      
      /* Re-enable pointer events for interactive elements */
      .quadrant.deck-image-background .quadrant-inner .life-controls,
      .quadrant.deck-image-background .quadrant-inner .commander-row,
      .quadrant.deck-image-background .quadrant-inner .player-settings-icon,
      .quadrant.deck-image-background .quadrant-inner .poison-counter-badge,
      .quadrant.deck-image-background .quadrant-inner .manual-elimination-icon,
      .quadrant.deck-image-background .quadrant-inner .turn-order-badge {
        pointer-events: auto;
        z-index: 30;
    }
    .turn-order-badge .bi-gear-fill,
    .turn-order-badge .turn-order-label {
        pointer-events: none;
    }
      
      /* --------------------------------------------------
        Mobile Overrides: Hide nav/back + full‐screen + even grids + absolute centering
        -------------------------------------------------- */
      @media (max-width: 1024px) {
        /* A. Full-screen fixes */
        html, body {
          height: 100%;
          margin: 0;
          padding: 0;
        }
        .life-tracker-container {
          position: fixed;
          inset: 0;
          padding: 0.5rem;
          padding-top: env(safe-area-inset-top);
          padding-bottom: env(safe-area-inset-bottom);
          overflow-y: auto;
          background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        }
        .back-btn {
          top: 0.5rem !important;
          left: 0.5rem !important;
        }

        /* B. Hide nav & back button ONLY on life_tracker.html */
        .life-tracker-container header,
        .life-tracker-container .navbar,
        .life-tracker-container .back-btn {
          display: none !important;
        }

        /* C. Re-grid players */
        .quadrant-grid.players-6 {
          grid-template-columns: repeat(3, 1fr);
          grid-template-rows: repeat(2, 1fr);
        }

        /* D. Make the grid fill its padded container */
        .quadrant-grid {
          position: relative !important;
          width: 100% !important;
          height: 100% !important;
        }

        .quadrant-inner {
          position: relative !important;
          width: 100%;
          height: 100%;
        }
        .quadrant-inner .player-label {
          position: absolute;
          top: 1.7rem;
          left: 50%;
          transform: translateX(-50%);
          text-align: center;
          width: 90%;
        }
        .quadrant-inner .life-display {
          position: absolute;
          top: 70%;
          left: 50%;
          transform: translate(-50%, -60%);
          text-align: center;
          width: 100%;
        }
        .quadrant-inner .life-controls {
          position: absolute;
          top: 25%;
          left: 50%;
          transform: translate(-50%, 0);
          display: flex;
          gap: 2vw;
          justify-content: center;
          width: 100%;
        }
      }

          /* Prevent zoom on mobile */
    * {
        touch-action: manipulation;
        -webkit-touch-callout: none;
        -webkit-user-select: none;
        -khtml-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
        user-select: none;
    }
    
    /* Allow normal touch behavior for form controls to fix mobile dropdown issues */
    select, input, textarea, button, .form-control, .form-select {
        touch-action: auto;
        -webkit-touch-callout: default;
        -webkit-user-select: text;
        -khtml-user-select: text;
        -moz-user-select: text;
        -ms-user-select: text;
        user-select: text;
    }
    
    /* Ensure select dropdowns work properly on mobile */
    select:focus, .form-control:focus, .form-select:focus {
        touch-action: auto;
        -webkit-touch-callout: default;
    }
    
    /* Allow text selection in form inputs for better UX */
    input[type="text"], input[type="email"], input[type="password"], 
    input[type="number"], input[type="search"], input[type="tel"], 
    input[type="url"], textarea {
        touch-action: auto;
        -webkit-user-select: text;
        user-select: text;
    }
    
    /* Prevent double-tap zoom on buttons */
    .life-btn {
        touch-action: manipulation;
        -webkit-tap-highlight-color: transparent;
    }
    
    /* Prevent zoom on the entire life tracker */
    .life-tracker-container {
        touch-action: manipulation;
        -webkit-touch-callout: none;
    }
    
    .life-change-badge {
        opacity: 0;
        transition: opacity 0.3s ease-in-out;
        position: absolute;
        top: 65%;
        left: 50%;
        transform: translate(-50%, -50%);
        z-index: 10;
        font-size: 1.5rem;
        font-weight: bold;
    }
    
    .life-change-badge.fade-in {
        opacity: 1;
    }
    
    .quadrant-inner {
        position: relative;
    }
    
    /* Additional mobile optimizations */
    body {
        touch-action: manipulation;
        -webkit-overflow-scrolling: touch;
    }
    
    /* Prevent zoom on quadrant areas */
    .quadrant {
        touch-action: manipulation;
    }
    
    /* Long press visual feedback */
    .life-btn.long-press-active {
        background-color: #dc3545 !important;
        color: white !important;
        transform: scale(1.1);
        transition: all 0.1s ease;
    }
    
    .life-btn.long-press-active:hover {
        background-color: #dc3545 !important;
        color: white !important;
    }
    
    /* Player overlay */
    .player-overlay {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background-color: rgba(255, 255, 255, 0.9);
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        z-index: 20;
        cursor: pointer;
        transition: opacity 0.3s ease;
    }
    
    .player-overlay.hidden {
        opacity: 0;
        pointer-events: none;
    }
    
    .player-overlay .commander-icon {
        font-size: 3rem;
        margin-bottom: 1rem;
        color: #6c757d;
    }
    
    .player-overlay .player-text {
        text-align: center;
        color: #6c757d;
        font-weight: bold;
        line-height: 1.4;
    }
    
    .commander-row {
        display: flex;
        justify-content: space-between;
        align-items: center;
        position: absolute;
        top: 0.5rem;
        left: 0.5rem;
        right: 0.5rem;
        z-index: 5;
        padding: 0 0.2em;
    }
    .commander-damage-badge {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: auto;
        min-width: 2em;
        height: 2em;
        aspect-ratio: auto;
        background: #eee;
        border-radius: 0.3em;
        font-size: 1.1em;
        font-weight: bold;
        color: #333;
        border: 2px solid #bbb;
        cursor: pointer;
        user-select: none;
        transition: background 0.2s, border 0.2s;
        text-align: center;
        box-sizing: border-box;
        flex: 1;
        margin: 0 0.1em;
        max-width: none;
    }
    
    /* Commander damage badge colors based on quadrant */
    .commander-damage-badge.q0 { background: #e09f5b; color: #fff; border-color: #d08a4a; transform: rotate(0);}
    .commander-damage-badge.q1 { background: #a77ff7; color: #fff; border-color: #8f67d7; transform: rotate(0);}
    .commander-damage-badge.q2 { background: #f76e6c; color: #fff; border-color: #e55a5a; }
    .commander-damage-badge.q3 { background: #5fbb97; color: #fff; border-color: #4daa86; }
    .commander-damage-badge.q4 { background: #6ec6f7; color: #fff; border-color: #5cb5e6; }
    .commander-damage-badge.q5 { background: #f7d06e; color: #333; border-color: #e6c05d; }

    /* trasnparent colors for player label badges if background image */
    .commander-damage-badge.q0[id^="player_label_badge_"] {
      background-color: rgba(224, 159, 91, 0.5) !important; /* #e09f5b */
      border-color: rgba(208, 138, 74, 0.5) !important;     /* #d08a4a */
    }
    
    .commander-damage-badge.q1[id^="player_label_badge_"] {
      background-color: rgba(167, 127, 247, 0.5) !important; /* #a77ff7 */
      border-color: rgba(143, 103, 215, 0.5) !important;     /* #8f67d7 */
    }
    
    .commander-damage-badge.q2[id^="player_label_badge_"] {
      background-color: rgba(247, 110, 108, 0.5) !important; /* #f76e6c */
      border-color: rgba(229, 90, 90, 0.5) !important;       /* #e55a5a */
    }
    
    .commander-damage-badge.q3[id^="player_label_badge_"] {
      background-color: rgba(95, 187, 151, 0.5) !important;  /* #5fbb97 */
      border-color: rgba(77, 170, 134, 0.5) !important;      /* #4daa86 */
    }
    
    .commander-damage-badge.q4[id^="player_label_badge_"] {
      background-color: rgba(110, 198, 247, 0.5) !important; /* #6ec6f7 */
      border-color: rgba(92, 181, 230, 0.5) !important;      /* #5cb5e6 */
    }
    
    .commander-damage-badge.q5[id^="player_label_badge_"] {
      background-color: rgba(247, 208, 110, 0.5) !important; /* #f7d06e */
      border-color: rgba(230, 192, 93, 0.5) !important;      /* #e6c05d */
    }
    
    
    /* Counter-rotate commander damage badges to appear upright */
    /* .q0 .commander-damage-badge,
    .q1 .commander-damage-badge { transform: rotate(180deg); } */
    
    /* For 6 players, badges in top row quadrants should rotate with their parents (no counter-rotation) */
    .quadrant-grid.players-6 .q0 .commander-damage-badge,
    .quadrant-grid.players-6 .q1 .commander-damage-badge,
    .quadrant-grid.players-6 .q2 .commander-damage-badge { transform: none; }
    
    /* Ensure badges in non-rotated quadrants stay upright */
    .q2 .commander-damage-badge,
    .q3 .commander-damage-badge,
    .q4 .commander-damage-badge,
    .q5 .commander-damage-badge { transform: none; }
    
    /* For 6 players, ensure badges in bottom row stay upright */
    .quadrant-grid.players-6 .q3 .commander-damage-badge,
    .quadrant-grid.players-6 .q4 .commander-damage-badge,
    .quadrant-grid.players-6 .q5 .commander-damage-badge { transform: none; }
    
    .commander-damage-badge:active {
        background: #d1e7dd;
        border-color: #0d6efd;
    }
    
    /* Commander damage badge icons */
    .commander-damage-badge i {
        font-size: 0.8em;
        opacity: 0.7;
        margin: 0 0.1em;
        pointer-events: none;
    }
    
    .commander-damage-badge i.bi-dash {
        margin-right: 0.6em;
        /* color: rgba(255, 255, 255, 0.5); */
    }
    
    .commander-damage-badge i.bi-plus {
        margin-left: 0.6em;
        /* color: rgba(255, 255, 255, 0.5); */
    }
    
    /* Commander damage badge when used as player label wrapper */
    .commander-damage-badge[id^="player_label_badge_"] {
        cursor: default;
        pointer-events: none;
        font-size: 1.1em;
        font-weight: bold;
        padding: 0.3em 0.6em;
        margin: 0.2em 0;
        display: inline-block;
        text-align: center;
        min-width: auto;
        width: auto;
        height: auto;
        aspect-ratio: auto;
        flex: none;
        position: relative;
        top: -30px;
    }
    
    /* Ensure player label badge doesn't have the interactive styling */
    .commander-damage-badge[id^="player_label_badge_"]:active {
        background: inherit;
        border-color: inherit;
    }

    .rotate-180 {
        display: inline-flex;       /* badges are inline-flex already, but good to be explicit */
        transform-origin: center;
        transform: rotate(180deg) !important;
      }
    .rotate-90 { transform: rotate(90deg); }
    .rotate-270 { transform: rotate(270deg); }

    /* 5 players: 4 in grid, 1 spanning side */
    .quadrant-grid.players-5 {
      grid-template-columns: repeat(3, 1fr);
      grid-template-rows: repeat(2, 1fr);
    }

    /* Settings bar on Life Tracker */
    .settings-icon {
        position: fixed;
        bottom: 45%;
        left: 50%;
        transform: translateX(-50%);
        width: 50px;
        height: 50px;
        background: rgba(0, 0, 0, 0.8);
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        z-index: 1000;
        cursor: pointer;
        transition: all 0.3s ease;
    }
    
    /* Settings icon position for more than 4 players */
    .settings-icon.many-players {
        bottom: -15px;
    }
    
    /* Turn Counter Icons */
    .top-turn-icon,
    .bottom-turn-icon {
        position: fixed;
        left: 50%;
        transform: translateX(-50%);
        width: 50px;
        height: 50px;
        background: rgba(0, 0, 0, 0.8);
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        z-index: 1000;
        cursor: pointer;
        transition: all 0.3s ease;
    }
    
    .top-turn-icon {
        bottom: calc(55% + 50px + 25px);
    }
    
    .bottom-turn-icon {
        bottom: calc(35% - 50px - 25px); /* 50% below settings icon */
    }
    
    .top-turn-icon:hover,
    .bottom-turn-icon:hover {
        background: rgba(0, 0, 0, 0.9);
    }
    
    .top-turn-icon .turnCount,
    .bottom-turn-icon .turnCount {
        color: rgba(255, 255, 255, 0.75);
        font-size: 24px;
        font-weight: bold;
        text-align: center;
    }
    
    .top-turn-icon .turnCount {
        transform: rotate(180deg);
        transform-origin: center;
    }

    /* Turn counter position for more than 4 players */
    .settings-icon.many-players ~ .top-turn-icon {
        bottom: calc(-15px + 50px + 25px);
    }
    
    .settings-icon.many-players ~ .bottom-turn-icon {
        bottom: calc(-15px - 50px - 25px);
    }
    
    .settings-icon i {
        color: #888;
        font-size: 20px;
        opacity: 0.5;
    }
    
    .settings-icon:hover {
        background: rgba(0, 0, 0, 0.9);
    }
    
    .settings-icon:hover i {
        opacity: 0.7;
    }
    
    .settings-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.95);
        z-index: 2000;
        display: none;
        align-items: center;
        justify-content: center;
        opacity: 0;
        transition: opacity 0.3s ease;
    }
    
    .settings-overlay.active {
        display: flex;
        opacity: 1;
    }
    
    .settings-content {
        background: white;
        border-radius: 15px;
        padding: 30px;
        width: 90%;
        max-width: 90%;
        max-height: 80%;
        overflow-y: auto;
        transform: scale(0.8);
        transition: transform 0.3s ease;
    }
    
    .settings-overlay.active .settings-content {
        transform: scale(1);
    }
    
    .settings-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 20px;
        padding-bottom: 15px;
        border-bottom: 1px solid #eee;
    }
    
    .settings-header h3 {
        margin: 0;
        color: #333;
    }
    
    .close-settings {
        background: none;
        border: none;
        font-size: 24px;
        cursor: pointer;
        color: #666;
        padding: 0;
        width: 30px;
        height: 30px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .close-settings:hover {
        color: #333;
    }
    
    .settings-section {
        margin-bottom: 25px;
    }
    
    .settings-section h4 {
        margin-bottom: 15px;
        color: #555;
        font-size: 16px;
    }
    
    .setting-item {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 10px 0;
        border-bottom: 1px solid #f5f5f5;
    }
    
    .setting-item:last-child {
        border-bottom: none;
    }
    
    .setting-label {
        font-size: 14px;
        color: #666;
    }
    
    .setting-control {
        display: flex;
        align-items: center;
        gap: 10px;
    }
    
    .toggle-switch {
        position: relative;
        width: 50px;
        height: 24px;
        background: #ccc;
        border-radius: 12px;
        cursor: pointer;
        transition: background 0.3s ease;
    }
    
    .toggle-switch.active {
        background: #007bff;
    }
    
    .toggle-switch::after {
        content: '';
        position: absolute;
        top: 2px;
        left: 2px;
        width: 20px;
        height: 20px;
        background: white;
        border-radius: 50%;
        transition: transform 0.3s ease;
    }
    
    .toggle-switch.active::after {
        transform: translateX(26px);
    }

    /* Player Settings Icon */
    .player-settings-icon {
        position: absolute;
        bottom: 0.5rem;
        left: 0.5rem;
        width: 2.5em;
        height: 2.5em;
        /* background: rgba(0, 0, 0, 0.7); */
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        z-index: 10;
        cursor: pointer;
        transition: all 0.3s ease;
        color: rgba(255, 255, 255, 0.7);
        font-size: 1.2em;
    }
    
    .player-settings-icon:hover {
        background: rgba(0, 0, 0, 0.9);
        transform: scale(1.1);
    }
    
    /* Poison Counter Badge */
    .poison-counter-badge {
        position: absolute;
        bottom: 0.5rem;
        right: 0.5rem;
        width: 2.5em;
        height: 2.5em;
        /* background: #28a745; */
        /* border-radius: 0.5em; */
        /* border: 2px solid #1e7e34; */
        cursor: pointer;
        user-select: none;
        transition: background 0.2s, border 0.2s;
        z-index: 10;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .poison-counter-badge:active {
        background: #1e7e34;
        border-color: #155724;
    }
    
    /* Poison icon styling */
    .poison-icon {
        width: 2.5em;
        height: 2.5em;
        filter: brightness(0); /* Make SVG black */
    }
    
    /* Poison count overlay */
    .poison-count {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        /* background: rgba(0, 0, 0, 0.8); */
        color: rgba(255, 255, 255, 0.9);
        font-weight: bold;
        font-size: 1.5em;
        padding: 0.1em 0.3em;
        border-radius: 0.3em;
        z-index: 15;
        pointer-events: none;
        text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
    }
    
    /* Counter-rotate icons to appear upright in rotated quadrants
    .q0 .player-settings-icon,
    .q1 .player-settings-icon,
    .q0 .poison-counter-badge,
    .q1 .poison-counter-badge { transform: rotate(180deg); } */
    
    /* For 6 players, icons in top row quadrants should rotate with their parents (no counter-rotation) */
    .quadrant-grid.players-6 .q0 .player-settings-icon,
    .quadrant-grid.players-6 .q1 .player-settings-icon,
    .quadrant-grid.players-6 .q2 .player-settings-icon,
    .quadrant-grid.players-6 .q0 .poison-counter-badge,
    .quadrant-grid.players-6 .q1 .poison-counter-badge,
    .quadrant-grid.players-6 .q2 .poison-counter-badge { transform: none; }
    
    /* Ensure icons in non-rotated quadrants stay upright */
    .q2 .player-settings-icon,
    .q3 .player-settings-icon,
    .q4 .player-settings-icon,
    .q5 .player-settings-icon,
    .q2 .poison-counter-badge,
    .q3 .poison-counter-badge,
    .q4 .poison-counter-badge,
    .q5 .poison-counter-badge { transform: none; }
    
    /* For 6 players, ensure icons in bottom row stay upright */
    .quadrant-grid.players-6 .q3 .player-settings-icon,
    .quadrant-grid.players-6 .q4 .player-settings-icon,
    .quadrant-grid.players-6 .q5 .player-settings-icon,
    .quadrant-grid.players-6 .q3 .poison-counter-badge,
    .quadrant-grid.players-6 .q4 .poison-counter-badge,
    .quadrant-grid.players-6 .q5 .poison-counter-badge { transform: none; }
    
    /* Turn order badge */
    .turn-order-badge {
        position: absolute;
        top: 80%;
        right: 85%;
        background: rgba(0, 0, 0, 0.125);
        color: white;
        border-radius: 50%;
        width: 24px;
        height: 24px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 0.8rem;
        font-weight: bold;
        z-index: 10;
    }
    
    .quadrant-grid.players-6 .q0 .turn-order-badge,
    .quadrant-grid.players-6 .q1 .turn-order-badge {
        transform: rotate(180deg);
    }
    
    .q2 .turn-order-badge,
    .q3 .turn-order-badge,
    .q4 .turn-order-badge,
    .q5 .turn-order-badge {
        transform: none;
    }
    
    .quadrant-grid.players-6 .q3 .turn-order-badge,
    .quadrant-grid.players-6 .q4 .turn-order-badge,
    .quadrant-grid.players-6 .q5 .turn-order-badge {
        transform: none;
    }

    /* Manual elimination icon */
    .manual-elimination-icon {
        position: absolute;
        bottom: 0.2rem;
        left: 50%;
        transform: translateX(-50%);
        width: 2rem;
        height: 2rem;
        background: rgba(0, 0, 0, 0.3);
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        transition: all 0.2s ease;
        z-index: 10;
    }

    .manual-elimination-icon.hidden {
        display: none;
    }

    .manual-elimination-icon:hover {
        background: rgba(0, 0, 0, 0.9);
        transform: translateX(-50%) scale(1.1);
    }

    .manual-elimination-icon:active {
        transform: translateX(-50%) scale(0.95);
    }

    .manual-elimination-icon i {
        color: white;
        font-size: 1rem;
    }

    /* Rotate manual elimination icon for rotated quadrants */
    /* Position turn order badge for different quadrant orientations */

    .q0 .manual-elimination-icon:hover,
    .q1 .manual-elimination-icon:hover {
        transform: translateX(-50%) rotate(180deg) scale(1.1);
    }

    .q0 .manual-elimination-icon:active,
    .q1 .manual-elimination-icon:active {
        transform: translateX(-50%) rotate(180deg) scale(0.95);
    }

    /* 5-6 player game adjustments */
    .quadrant-grid.players-5 .q2 .manual-elimination-icon,
    .quadrant-grid.players-6 .q2 .manual-elimination-icon {
        transform: translateX(-50%) rotate(180deg);
    }

    .quadrant-grid.players-5 .q2 .manual-elimination-icon:hover,
    .quadrant-grid.players-6 .q2 .manual-elimination-icon:hover {
        transform: translateX(-50%) rotate(180deg) scale(1.1);
    }

    .quadrant-grid.players-5 .q2 .manual-elimination-icon:active,
    .quadrant-grid.players-6 .q2 .manual-elimination-icon:active {
        transform: translateX(-50%) rotate(180deg) scale(0.95);
    }

    .quadrant-grid.players-6 .q3 .manual-elimination-icon,
    .quadrant-grid.players-6 .q4 .manual-elimination-icon,
    .quadrant-grid.players-6 .q5 .manual-elimination-icon {
        transform: translateX(-50%) rotate(180deg);
    }

    .quadrant-grid.players-6 .q3 .manual-elimination-icon:hover,
    .quadrant-grid.players-6 .q4 .manual-elimination-icon:hover,
    .quadrant-grid.players-6 .q5 .manual-elimination-icon:hover {
        transform: translateX(-50%) rotate(180deg) scale(1.1);
    }

    .quadrant-grid.players-6 .q3 .manual-elimination-icon:active,
    .quadrant-grid.players-6 .q4 .manual-elimination-icon:active,
    .quadrant-grid.players-6 .q5 .manual-elimination-icon:active {
        transform: translateX(-50%) rotate(180deg) scale(0.95);
    }

    @media (max-width: 600px) {
        .manual-elimination-icon {
            width: 1.8rem;
            height: 1.8rem;
            bottom: 0.3rem;
        }

        .manual-elimination-icon i {
            font-size: 0.9rem;
        }
    }

    /* Player Modal Overlay */
    .player-modal-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.95);
        z-index: 2000;
        display: none;
        align-items: center;
        justify-content: center;
        opacity: 0;
        transition: opacity 0.3s ease;
    }
    
    .player-modal-overlay.active {
        display: flex;
        opacity: 1;
    }
    
    .player-modal-content {
        background: white;
        border-radius: 15px;
        padding: 30px;
        width: 85%;
        max-width: 90%;
        max-height: 80%;
        overflow-y: auto;
        transform: scale(0.8);
        transition: transform 0.3s ease;
        transform-origin: center center;
    }
    
    .player-modal-overlay.active .player-modal-content {
        transform: scale(1);
    }
    
    .player-modal-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 20px;
        padding-bottom: 15px;
        border-bottom: 1px solid #eee;
    }
    
    .player-modal-header h3 {
        margin: 0;
        color: #333;
    }
    
    .close-player-modal {
        background: none;
        border: none;
        font-size: 24px;
        cursor: pointer;
        color: #666;
        padding: 0;
        width: 30px;
        height: 30px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .close-player-modal:hover {
        color: #333;
    }

    /* Elimination Confirmation Modal */
    .elimination-modal-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.95);
        z-index: 3000;
        display: none;
        align-items: center;
        justify-content: center;
        opacity: 0;
        transition: opacity 0.3s ease;
    }
    
    .elimination-modal-overlay.active {
        display: flex;
        opacity: 1;
    }
    
    .elimination-modal-content {
        background: white;
        border-radius: 15px;
        padding: 30px;
        width: 90%;
        max-width: 400px;
        transform: scale(0.8);
        transition: transform 0.3s ease;
    }
    
    .elimination-modal-overlay.active .elimination-modal-content {
        transform: scale(1);
    }
    
    .elimination-modal-header {
        text-align: center;
        margin-bottom: 20px;
        padding-bottom: 15px;
        border-bottom: 1px solid #eee;
    }
    
    .elimination-modal-header h3 {
        margin: 0;
        color: #333;
        font-size: 1.5rem;
    }
    
    .elimination-modal-body {
        text-align: center;
    }
    
    .elimination-modal-body p {
        margin-bottom: 25px;
        font-size: 1.1rem;
        color: #666;
    }
    
    .elimination-modal-buttons {
        display: flex;
        gap: 15px;
        justify-content: center;
    }
    
    .elimination-modal-buttons .btn {
        min-width: 120px;
        padding: 10px 20px;
        font-weight: 600;
    }
    
    /* Elimination details section */
    .elimination-details {
        margin: 20px 0;
        padding: 15px;
        background: #f8f9fa;
        border-radius: 8px;
        border: 1px solid #e9ecef;
    }
    
    .elimination-details .form-label {
        font-weight: 500;
        color: #495057;
        margin-bottom: 8px;
    }
    
    .elimination-details .form-control {
        border: 1px solid #ced4da;
        border-radius: 6px;
        padding: 8px 12px;
        font-size: 0.9rem;
    }
    
    .elimination-details .form-control:disabled {
        background-color: #e9ecef;
        opacity: 0.6;
    }
    
    /* Mobile-specific optimizations for elimination modal dropdowns */
    @media (max-width: 768px) {
        .elimination-details .form-control,
        .elimination-details .form-select {
            font-size: 16px; /* Prevents iOS zoom on focus */
            padding: 12px 16px; /* Larger touch targets for mobile */
            min-height: 44px; /* Apple's recommended minimum touch target size */
        }
        
        .elimination-details .form-label {
            font-size: 14px;
            margin-bottom: 10px;
        }
        
        /* Ensure dropdowns are easily tappable on mobile */
        .elimination-details select {
            -webkit-appearance: none;
            -moz-appearance: none;
            appearance: none;
            background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
            background-repeat: no-repeat;
            background-position: right 12px center;
            background-size: 16px;
            padding-right: 40px;
        }
    }
    
    /* Eliminated Player Overlay */
    .eliminated-player-overlay {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background-color: rgba(0, 0, 0, 0.8);
        display: flex;
        align-items: center;
        justify-content: center;
        z-index: 25;
        pointer-events: none;
        opacity: 0;
        transition: opacity 0.3s ease;
    }
    
    .eliminated-player-overlay.active {
        opacity: 1;
    }
    
    .eliminated-player-content {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        height: 100%;
    }
    
    .eliminated-player-content i {
        font-size: 8vw;
        color: #dc3545;
        text-shadow: 0 0 20px rgba(220, 53, 69, 0.8);
        animation: eliminatedPulse 2s ease-in-out infinite;
    }
    
    /* Different colors for different elimination methods */
    .eliminated-player-content i.poison-eliminated {
        color: #28a745;
        text-shadow: 0 0 20px rgba(40, 167, 69, 0.8);
    }
    
    .eliminated-player-content i.commander-eliminated {
        color: #fd7e14;
        text-shadow: 0 0 20px rgba(253, 126, 20, 0.8);
    }
    
    .eliminated-player-content i.damage-eliminated {
        color: #dc3545;
        text-shadow: 0 0 20px rgba(220, 53, 69, 0.8);
    }
    
    @keyframes eliminatedPulse {
        0%, 100% {
            transform: scale(1);
            opacity: 0.8;
        }
        50% {
            transform: scale(1.1);
            opacity: 1;
        }
    }
    
    /* Mobile responsive adjustments for eliminated overlay */
    @media (max-width: 600px) {
        .eliminated-player-content i {
            font-size: 4rem;
        }
    }

    /* Show a full-screen overlay in portrait mode */
.portrait::before {
    content: "Please rotate your device";
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: #000;
    color: white;
    font-size: 5vw;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 1em;
    /* Add transition for smoother appearance */
    transition: opacity 0.3s ease;
}

/* Add a more specific rule for very small screens to prevent false positives */
@media (max-width: 480px) and (max-height: 600px) {
    .portrait::before {
        /* Reduce font size for very small screens */
        font-size: 4vw;
        padding: 0.5em;
    }
}

/* Add debugging info for orientation issues */
.portrait::after {
    content: "Debug: Portrait mode detected";
    position: fixed;
    bottom: 10px;
    left: 10px;
    z-index: 10000;
    background: rgba(255, 0, 0, 0.8);
    color: white;
    font-size: 12px;
    padding: 5px;
    border-radius: 3px;
    /* Only show in development/debug mode */
    display: none;
}

/* Show debug info when needed */
.debug .portrait::after {
    display: block;
}

/* Hide portrait warning on large screens */
@media (min-width: 1025px) {
    .portrait::before {
        display: none !important;
    }
}
  
/* Profile Page Enhancements */
.profile-card {
  border-radius: 18px;
  overflow: hidden;
  background: #f8f9fa;
}
.profile-avatar {
  border: 4px solid #fff;
  box-shadow: 0 2px 12px rgba(0,0,0,0.10);
  margin-bottom: 0.5rem;
}
.profile-card .badge {
  margin: 0 2px 4px 2px;
  font-size: 0.95em;
}
.profile-card .btn {
  font-weight: 500;
}

/* Profile Modal Enhancements */
#editProfileModal .modal-content {
  border-radius: 16px;
  box-shadow: 0 4px 32px rgba(0,0,0,0.12);
}
#editProfileModal .modal-header {
  border-top-left-radius: 16px;
  border-top-right-radius: 16px;
  background: linear-gradient(90deg, #a77ff7 0%, #6ec6f7 100%);
  color: #fff;
}
#editProfileModal .modal-title i {
  vertical-align: middle;
}
#editProfileModal .form-label {
  font-weight: 500;
}
#editProfileModal .btn-success {
  font-weight: 600;
  letter-spacing: 0.5px;
}

/* Responsive tweaks for profile */
@media (max-width: 768px) {
  .profile-card {
    margin-bottom: 1.5rem;
  }
  .profile-avatar {
    width: 80px !important;
    height: 80px !important;
  }
}

/* --- Profile Page Modern Redesign --- */
.profile-page {
  max-width: 600px;
  margin: 0 auto;
}
.profile-header {
  background: #fff;
  border-radius: 1.5rem;
  box-shadow: 0 2px 16px rgba(0,0,0,0.07);
  border: none;
  margin-bottom: 2rem;
}
.profile-avatar-wrapper {
  position: relative;
  width: 120px;
  height: 120px;
}
.profile-avatar-lg {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border: 4px solid #fff;
  box-shadow: 0 2px 12px rgba(0,0,0,0.10);
  background: #f3f3f3;
}
.profile-name {
  font-size: 2rem;
  font-weight: 700;
}
.profile-handle {
  font-size: 1.1rem;
  color: #888;
}
.profile-meta {
  font-size: 1rem;
  color: #666;
  gap: 1.2rem;
}
.profile-header .btn {
  border-radius: 2rem;
  font-weight: 500;
  min-width: 110px;
}
.profile-header .btn-primary {
  background: linear-gradient(90deg, #a77ff7 0%, #6ec6f7 100%);
  border: none;
}
.profile-header .btn-outline-secondary {
  border: 1.5px solid #a77ff7;
  color: #a77ff7;
}
.profile-header .btn-outline-secondary:hover {
  background: #f3f3f3;
  color: #6c3fc7;
}

.profile-stats-card, .profile-details-card {
  border-radius: 1.25rem;
  background: #fff;
  border: none;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  margin-bottom: 2rem;
}
.profile-stats-card h5, .profile-details-card h5 {
  font-weight: 700;
  color: #6c3fc7;
}
.stat-label {
  font-size: 0.95rem;
  color: #888;
  margin-bottom: 0.2rem;
}
.stat-value {
  font-size: 1.5rem;
  font-weight: 600;
  color: #222;
}
.profile-details-card .mb-2 {
  font-size: 1.05rem;
}

/* Responsive tweaks */
@media (max-width: 768px) {
  .profile-page {
    max-width: 100%;
    padding: 0 0.5rem;
  }
  .profile-header, .profile-stats-card, .profile-details-card {
    padding: 1.2rem 0.7rem;
  }
  .profile-avatar-wrapper, .profile-avatar-lg {
    width: 80px !important;
    height: 80px !important;
  }
  .profile-name {
    font-size: 1.3rem;
  }
  .stat-value {
    font-size: 1.1rem;
  }
}

/* Game action icons */
.edit-date-icon,
.request-deletion-icon,
.edit-deck-icon,
.edit-guest-icon {
  font-size: 1.1rem !important;
  cursor: pointer !important;
  transition: transform 0.2s ease;
  min-width: 24px;
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.edit-date-icon:hover,
.request-deletion-icon:hover,
.edit-deck-icon:hover,
.edit-guest-icon:hover {
  transform: scale(1.1);
}

.request-deletion-icon {
  color: #dc3545 !important;
}

.edit-date-icon {
  color: #0d6efd !important;
}

.edit-deck-icon,
.edit-winner-icon {
  cursor: pointer;
  transition: color 0.2s ease;
}

.edit-deck-icon:hover,
.edit-winner-icon:hover {
  color: #495057;
}

/* Game End Modal Styles */
.game-end-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.game-end-modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.game-end-modal-content {
  background: white;
  border-radius: 15px;
  padding: 2rem;
  max-width: 500px;
  width: 90%;
  text-align: center;
  transform: scale(0.7);
  transition: transform 0.3s ease;
}

.game-end-modal-overlay.active .game-end-modal-content {
  transform: scale(1);
}

/* Final Win Overlay Styles */
#finalWinOverlay {
  position: fixed; 
  inset: 0;
  display: none;
  z-index: 20000; /* above everything else */
}
#finalWinOverlay.show { 
  display: block; 
}
#finalWinOverlay .final-overlay-backdrop {
  position: absolute; 
  inset: 0;
  background: rgba(0,0,0,.6);
  backdrop-filter: blur(2px);
}
#finalWinOverlay .final-overlay-card {
  position: absolute; 
  inset: 0;
  display: grid; 
  place-items: center;
  pointer-events: none; /* allow inner content to catch */
}
#finalWinOverlay .final-overlay-card > * {
  pointer-events: auto;
  background: #111;
  color: #fff;
  border-radius: 1rem;
  padding: 2rem;
  text-align: center;
  max-width: 90vw;
  margin: auto;
  box-shadow: 0 10px 30px rgba(0,0,0,.4);
}

.game-end-modal-header h3 {
  color: #28a745;
  margin-bottom: 1rem;
  font-size: 1.5rem;
  font-weight: bold;
}

.game-end-modal-body p {
  margin-bottom: 1rem;
  font-size: 1.1rem;
}

.game-end-modal-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-top: 1.5rem;
}

.game-end-modal-buttons .btn {
  min-width: 120px;
  padding: 0.75rem 1.5rem;
}

/* Enhanced Stats Modal Styles */
.enhanced-stats-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  overflow-y: auto;
  padding: 1rem;
}

.enhanced-stats-modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.enhanced-stats-modal-content {
  background: white;
  border-radius: 15px;
  max-width: 800px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  transform: scale(0.7);
  transition: transform 0.3s ease;
}

.enhanced-stats-modal-overlay.active .enhanced-stats-modal-content {
  transform: scale(1);
}

.enhanced-stats-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 2rem;
  border-bottom: 1px solid #dee2e6;
  position: sticky;
  top: 0;
  background: white;
  z-index: 10;
}

.enhanced-stats-modal-header h3 {
  margin: 0;
  color: #495057;
  font-weight: bold;
}

.close-enhanced-stats-modal {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: #6c757d;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 50%;
  transition: all 0.2s ease;
}

.close-enhanced-stats-modal:hover {
  background: #f8f9fa;
  color: #495057;
}

.enhanced-stats-modal-body {
  padding: 2rem;
}

.enhanced-stats-modal-buttons {
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid #dee2e6;
}

.enhanced-stats-modal-buttons .btn {
  min-width: 120px;
  padding: 0.75rem 1.5rem;
}

.turn-order-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
}
.turn-order-badge .bi-gear-fill {
  font-size: 2rem;
  opacity: 0.5;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 1;
}
.turn-order-badge .turn-order-label {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  font-weight: bold;
  color: #222;
  z-index: 2;
  pointer-events: none;
  font-size: 1.1rem;
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
  .game-end-modal-content,
  .enhanced-stats-modal-content {
    margin: 1rem;
    width: calc(100% - 2rem);
  }
  
  .game-end-modal-buttons,
  .enhanced-stats-modal-buttons {
    flex-direction: column;
  }
  
  .game-end-modal-buttons .btn,
  .enhanced-stats-modal-buttons .btn {
    width: 100%;
  }
  
  .enhanced-stats-modal-header {
    padding: 1rem;
  }
  
  .enhanced-stats-modal-body {
    padding: 1rem;
  }
  .deck-option-item {
    font-size: 0.8rem;
  }
}

      /* -------------------------------
         Large Screen Full-Screen Fix (iPad Pro, Desktop)
         ------------------------------- */
         @media (min-width: 1025px) {
          html, body {
            height: 100%;
            margin: 0;
            padding: 0;
            overflow-x: hidden;
            overflow-y: auto;
          }
  
          .life-tracker-container {
            position: fixed;
            inset: 0;
            padding: 0;
            overflow: hidden;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
          }
  
          /* Hide navbar and back button on large screens for life tracker */
          .life-tracker-container header,
          life-tracker-container .navbar,
          .life-tracker-container .back-btn {
            display: none !important;
          }
  
          /* Ensure quadrant grid fills the entire screen */
          .quadrant-grid {
            position: absolute !important;
            width: 100vw !important;
            height: 100vh !important;
            top: 0 !important;
            left: 0 !important;
            right: 0 !important;
            bottom: 0 !important;
          }
  
          /* Adjust quadrant inner positioning for large screens */
          .quadrant-inner {
            position: relative !important;
            width: 100%;
            height: 100%;
          }
  
          .quadrant-inner .player-label {
            position: absolute;
            top: 3rem;
            left: 50%;
            transform: translateX(-50%);
            text-align: center;
            width: 90%;
            font-size: 2rem;
          }
  
          .quadrant-inner .life-display {
            position: absolute;
            top: 60%;
            left: 50%;
            transform: translate(-50%, -60%);
            text-align: center;
            width: 100%;
            font-size: 10vw;
          }
  
          .quadrant-inner .life-controls {
            position: absolute;
            top: 32%;
            left: 50%;
            transform: translate(-50%, 0);
            display: flex;
            gap: 4vw;
            justify-content: center;
            width: 100%;
          }
  
          .quadrant-inner .life-btn {
            font-size: 4vw;
            width: 4em;
            height: 4em;
          }
  
          /* Adjust settings and turn counter positioning for large screens */
          .settings-icon {
            bottom: 47%;
            width: 60px;
            height: 60px;
          }
  
          .settings-icon.many-players {
            bottom: 10px;
          }
  
          .top-turn-icon {
            bottom: calc(65% + 60px + 30px);
            width: 60px;
            height: 60px;
          }
  
          .bottom-turn-icon {
            bottom: calc(31% - 60px - 30px);
            width: 60px;
            height: 60px;
          }
  
          .settings-icon.many-players ~ .top-turn-icon {
            bottom: calc(10px + 60px + 30px);
          }
  
          .settings-icon.many-players ~ .bottom-turn-icon {
            bottom: calc(10px - 60px - 30px);
          }
  
          .settings-icon i,
          .top-turn-icon .turnCount,
          .bottom-turn-icon .turnCount {
            font-size: 28px;
          }
  
          /* Adjust commander damage badges for large screens */
                      .commander-damage-badge {
                font-size: 1.3em;
                min-width: 2.5em;
                height: 2.5em;
            }
            
            .commander-damage-badge[id^="player_label_badge_"] {
                font-size: 1.3em;
                padding: 0.4em 0.8em;
                top: -75px;
            }
  
          /* Adjust player settings and poison icons for large screens */
          .player-settings-icon,
          .poison-counter-badge {
            width: 3em;
            height: 3em;
            font-size: 1.5em;
          }

          .player-settings-icon {
            font-size: 2.5em;
            bottom: -10px;
            left: -20px;
          }

          .poison-counter-badge {
            bottom: 3%;
            right: 2%;
          }
  
          .poison-icon {
            width: 3em;
            height: 3em;
          }
  
          .poison-count {
            font-size: 1.8em;
          }
  
          /* Adjust turn order badge for large screens */
          .turn-order-badge {
            width: 50px;
            height: 50px;
            font-size: 2rem;
            top: 85%;
            right: 83%;
          }
          .turn-order-badge .bi-gear-fill {
            font-size: 3rem;
          }
          .turn-order-badge .turn-order-label {
            font-size: 2rem;
            color: #fff;
          }
          /* Adjust manual elimination icon for large screens */
          .manual-elimination-icon {
            width: 2.5rem;
            height: 2.5rem;
          }
  
          .manual-elimination-icon i {
            font-size: 1.2rem;
          }
  
          /* Adjust life change badge for large screens */
          .life-change-badge {
            font-size: 2.5rem;
            top: 57%;
          }
  
          /* Additional adjustments for very large screens (4K, etc.) */
          @media (min-width: 1920px) {
            .quadrant-inner .life-display {
              font-size: 5vw;
            }
  
            .quadrant-inner .life-btn {
              font-size: 2.5vw;
              width: 5em;
              height: 5em;
            }
  
            .settings-icon,
            .top-turn-icon,
            .bottom-turn-icon {
              width: 70px;
              height: 70px;
            }
  
            .settings-icon i,
            .top-turn-icon .turnCount,
            .bottom-turn-icon .turnCount {
              font-size: 32px;
            }
  
            .commander-damage-badge {
              font-size: 1.5em;
              min-width: 3em;
              height: 3em;
            }
  
            .player-settings-icon,
            .poison-counter-badge {
              width: 3.5em;
              height: 3.5em;
              font-size: 1.6em;
            }
  
            .poison-icon {
              width: 3.5em;
              height: 3.5em;
            }
  
            .poison-count {
              font-size: 2em;
            }
  
            .turn-order-badge {
              width: 35px;
              height: 35px;
              font-size: 1.1rem;
            }
  
            .manual-elimination-icon {
              width: 3rem;
              height: 3rem;
            }
  
            .manual-elimination-icon i {
              font-size: 1.4rem;
            }
  
            .life-change-badge {
              font-size: 2.5rem;
            }
          }
        }
        
        /* Wake Lock Status Indicator */
        .wake-lock-status {
          position: fixed;
          top: 1rem;
          right: 1rem;
          background: rgba(40, 167, 69, 0.9);
          color: white;
          padding: 0.5rem 1rem;
          border-radius: 50px;
          font-size: 0.875rem;
          font-weight: 600;
          display: flex;
          align-items: center;
          gap: 0.5rem;
          z-index: 1001;
          box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
          backdrop-filter: blur(10px);
          border: 1px solid rgba(255, 255, 255, 0.2);
        }
        
        .wake-lock-status i {
          font-size: 1rem;
          animation: pulse 2s infinite;
        }
        
        @keyframes pulse {
          0%, 100% { opacity: 1; }
          50% { opacity: 0.7; }
        }
        
        @keyframes fadeInOut {
          0% { opacity: 0; transform: translateY(-10px); }
          20% { opacity: 1; transform: translateY(0); }
          80% { opacity: 1; transform: translateY(0); }
          100% { opacity: 0; transform: translateY(-10px); }
        }
        
        @keyframes fadeOut {
          0% { opacity: 1; transform: translateY(0); }
          100% { opacity: 0; transform: translateY(-10px); }
        }
        
        @media (max-width: 768px) {
          .wake-lock-status {
            top: 0.5rem;
            right: 0.5rem;
            padding: 0.4rem 0.8rem;
            font-size: 0.8rem;
          }
          
          .wake-lock-status i {
            font-size: 0.9rem;
          }
        }

        @supports(padding-top: env(safe-area-inset-top)) {
          .life-tracker-container {
            padding-top: constant(safe-area-inset-top, 1.5rem); /* legacy syntax */
            padding-top: env(safe-area-inset-top, 1.5rem);      /* modern syntax */
          }
          
        }

        .standalone-mode .life-tracker-container {
          padding-top: env(safe-area-inset-top);
        }
        
/* Tom Select Rotation Styles */
/* Only rotate the control for quadrants that are already rotated */
.q0 .ts-control,
.q1 .ts-control,
.quadrant-grid.players-6 .q2 .ts-control {
  transform: rotate(180deg);
}

/* Don't rotate controls for non-rotated quadrants */
.q2 .ts-control,
.q3 .ts-control,
.q4 .ts-control,
.q5 .ts-control {
  transform: none;
}

/* For 6 players, don't rotate q2 control */
.quadrant-grid.players-6 .q2 .ts-control {
  transform: rotate(180deg);
}

/* For 6 players, don't rotate q3, q4, q5 controls */
.quadrant-grid.players-6 .q3 .ts-control,
.quadrant-grid.players-6 .q4 .ts-control,
.quadrant-grid.players-6 .q5 .ts-control {
  transform: none;
}

.ts-dropdown.dropdown-rotate {
  transform: rotate(180deg);
  transform-origin: top;
  z-index: 9999;
}

.ts-dropdown.dropdown-rotate .option {
  transform: rotate(180deg);
}

/* Fix text alignment in rotated dropdown */
.ts-dropdown.dropdown-rotate .option {
  text-align: left;
}

/* Ensure the control maintains proper appearance when rotated */
.ts-control {
  transform-origin: center;
}

/* Mobile responsive adjustments for Tom Select */
@media (max-width: 768px) {
  .ts-control {
    font-size: 0.9rem;
  }
  
  .ts-dropdown.dropdown-rotate .option {
    font-size: 0.9rem;
    padding: 0.5rem 0.75rem;
  }
}

/* Ensure TomSelect dropdown is always above cards and has a solid background (record_game.html deck dropdown) */
.deck-dropdown + .ts-dropdown {
  background: #fff !important;
  z-index: 2000 !important;
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}

.ts-dropdown {
  z-index: 2000 !important; /* higher than modals, tooltips, navbars, etc. */
}     

/* Allow manual disabling of orientation warning for troubleshooting */
.portrait.no-orientation-warning::before {
    display: none !important;
}

/* Emergency override for persistent orientation issues */
.portrait.force-landscape::before {
    display: none !important;
}

/* -------------------------------
   PWA iOS Safe Area Support
   ------------------------------- */
@supports(padding-top: env(safe-area-inset-top)) {
  /* Fix navbar positioning when installed as PWA on iOS */
  .navbar {
    padding-top: env(safe-area-inset-top, 0.5rem);
    padding-left: env(safe-area-inset-left, 0);
    padding-right: env(safe-area-inset-right, 0);
  }
  
  /* Ensure navbar content is properly positioned */
  .navbar .container {
    padding-left: max(env(safe-area-inset-left), 0.75rem);
    padding-right: max(env(safe-area-inset-right), 0.75rem);
  }
  
  /* Fix body padding to account for navbar safe area */
  body {
    padding-top: 0; /* Remove default body padding since navbar handles it */
  }
}

/* Additional PWA-specific adjustments */
@media (display-mode: standalone) {
  /* When running as PWA */
  .navbar {
    position: sticky;
    top: 0;
    z-index: 1030;
  }
  
  /* Ensure content doesn't overlap with navbar */
  main {
    padding-top: 0;
  }
}

/* iOS Safari specific fixes */
@supports (-webkit-touch-callout: none) {
  .navbar {
    /* Ensure navbar is above iOS UI elements */
    position: sticky;
    top: 0;
    z-index: 1030;
  }
}

/* Additional PWA and iOS specific navbar adjustments */
@media (display-mode: standalone) and (max-width: 1024px) {
  /* When running as PWA on mobile devices */
  .navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1030;
    width: 100%;
  }
  
  /* Add top margin to main content to prevent overlap with fixed navbar */
  main {
    margin-top: calc(56px + env(safe-area-inset-top, 0px));
  }
  
  /* Ensure navbar height is consistent */
  .navbar {
    min-height: 56px;
  }
}

/* iOS Safari specific navbar height adjustments */
@supports (-webkit-touch-callout: none) and (max-width: 1024px) {
  .navbar {
    /* Account for iOS status bar */
    padding-top: max(env(safe-area-inset-top), 0.5rem);
    min-height: calc(56px + env(safe-area-inset-top, 0px));
  }
  
  /* Adjust main content margin for iOS */
  main {
    margin-top: calc(56px + env(safe-area-inset-top, 0px));
  }
}

/* Ensure navbar content is properly aligned on iOS */
@supports (-webkit-touch-callout: none) {
  .navbar .container {
    padding-left: max(env(safe-area-inset-left), 0.75rem);
    padding-right: max(env(safe-area-inset-right), 0.75rem);
  }
}

/* PWA mode specific styles */
.pwa-mode .navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1030;
  width: 100%;
}

.pwa-mode main {
  margin-top: calc(56px + env(safe-area-inset-top, 0px));
}

/* iOS device specific adjustments */
.ios-device .navbar {
  padding-top: max(env(safe-area-inset-top), 0.5rem);
  min-height: calc(56px + env(safe-area-inset-top, 0px));
}

.ios-device main {
  margin-top: calc(56px + env(safe-area-inset-top, 0px));
}

/* Ensure proper spacing for PWA mode */
@media (display-mode: standalone) {
  .pwa-mode .navbar {
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  }
}

/* Fallback for browsers that don't support safe area insets */
@supports not (padding-top: env(safe-area-inset-top)) {
  .navbar {
    padding-top: 0.5rem;
  }
  
  .pwa-mode main {
    margin-top: 56px;
  }
}

/* Ensure navbar is always visible and properly positioned */
.navbar {
  background-color: var(--bs-primary) !important;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

/* Handle landscape orientation on mobile */
@media (max-width: 1024px) and (orientation: landscape) {
  .pwa-mode .navbar {
    min-height: 48px; /* Slightly smaller for landscape */
  }
  
  .pwa-mode main {
    margin-top: calc(48px + env(safe-area-inset-top, 0px));
  }
}

/* Offcanvas navigation drawer safe area support */
@supports(padding-top: env(safe-area-inset-top)) {
  .offcanvas {
    padding-top: env(safe-area-inset-top, 0);
    padding-left: env(safe-area-inset-left, 0);
    padding-right: env(safe-area-inset-right, 0);
  }
  
  .offcanvas-header {
    padding-top: max(env(safe-area-inset-top), 1rem);
    padding-left: max(env(safe-area-inset-left), 1rem);
    padding-right: max(env(safe-area-inset-right), 1rem);
  }
  
  .offcanvas-body {
    padding-left: max(env(safe-area-inset-left), 1rem);
    padding-right: max(env(safe-area-inset-right), 1rem);
    padding-bottom: max(env(safe-area-inset-bottom), 1rem);
  }
}

/* PWA mode offcanvas adjustments */
.pwa-mode .offcanvas {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 1045; /* Higher than navbar */
}

/* iOS device specific offcanvas adjustments */
.ios-device .offcanvas {
  padding-top: env(safe-area-inset-top, 0);
}

.ios-device .offcanvas-header {
  padding-top: max(env(safe-area-inset-top), 1rem);
}

/* Ensure offcanvas is properly positioned in PWA mode */
@media (display-mode: standalone) {
  .offcanvas {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 1045;
  }
}

/***** Colors *****/
.gold {
  color: #e7ca81;
}

.silver {
  color: #c0c0c0;
}

.bronze {
  color: #cd7f32;
}

/***** Mobile Admin View *****/
.role-select:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.role-select:disabled + small {
  opacity: 0.8;
}

.text-muted {
  opacity: 0.7;
}

.form-check-input:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.super-admin-row {
  background-color: rgba(220, 53, 69, 0.05) !important;
}

/* Mobile Cards Layout */
.user-cards {
  display: none;
}

.user-card {
  background: #fff;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 1rem;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.user-card.super-admin {
  background-color: rgba(220, 53, 69, 0.05);
  border-left: 4px solid #dc3545;
}

.user-card-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #e9ecef;
}

.user-card-avatar {
  flex-shrink: 0;
}

.user-card-info {
  flex: 1;
  min-width: 0;
}

.user-card-name {
  font-weight: 600;
  margin-bottom: 0.25rem;
  color: #212529;
}

.user-card-discord {
  font-size: 0.875rem;
  color: #6c757d;
  margin-bottom: 0.25rem;
}

.user-card-id {
  font-size: 0.75rem;
  color: #adb5bd;
  font-family: monospace;
}

.user-card-role {
  margin-bottom: 0.5rem;
}

.user-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.user-card-field {
  margin-bottom: 0.75rem;
}

.user-card-field-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: #6c757d;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.25rem;
}

.user-card-field-value {
  font-size: 0.875rem;
  color: #212529;
}

.user-card-field.editable {
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  transition: background-color 0.2s;
}

.user-card-field.editable:hover {
  background-color: #f8f9fa;
}

.user-card-field.editable:focus {
  background-color: #e9ecef;
  outline: none;
}

/* Responsive breakpoints */
@media (max-width: 767.98px) {
  .user-table {
    display: none;
  }
  
  .user-cards {
    display: block;
  }

  .container {
    max-width: 100% !important;
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .btn {
    font-size: 0.875rem;
    padding: 0.5rem 0.75rem;
  }

  .form-control, .form-select {
    font-size: 0.875rem;
  }
}

@media (min-width: 768px) {
  .user-cards {
    display: none;
  }
  
  .user-table {
    display: block;
  }
}

/* Enhanced mobile form controls */
.mobile-form-row {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.mobile-form-row .col-md-3,
.mobile-form-row .col-md-2 {
  width: 100%;
}

@media (max-width: 767.98px) {
  .mobile-form-row {
    flex-direction: column;
  }
  
  /* Mobile-specific enhancements */
  .user-card {
    margin-bottom: 1.5rem;
  }
  
  .user-card-field {
    margin-bottom: 1rem;
  }
  
  .user-card-actions {
    margin-bottom: 1.5rem;
  }
  
  .btn {
    min-height: 44px; /* Better touch target */
  }
  
  .form-check-input {
    min-width: 44px;
    min-height: 44px;
  }
  
  .form-select {
    min-height: 44px;
  }
  
  /* Improve mobile pagination */
  .pagination .page-link {
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
}
  /* Make table match form container width on desktop */
  @media (min-width: 768px) {
    .user-table {
      max-width: 80%;
      margin: 0 auto;
    }
  }

/* Hide navigation on life tracker page */
.life-tracker-container .navbar,
.life-tracker-container ~ .navbar,
.life-tracker-container + .navbar,
.life-tracker-container ~ .offcanvas,
.life-tracker-container + .offcanvas {
    display: none !important;
}

/* Alternative approach - hide navigation when body has life-tracker class */
body.life-tracker-page .navbar,
body.life-tracker-page .offcanvas {
    display: none !important;
}

/* Hide navigation when on life tracker route */
.life-tracker-container {
    /* Ensure the container takes full height without navbar */
    min-height: 100vh;
    padding-top: 0;
}

/* Hide any remaining navigation elements */
.life-tracker-container nav,
.life-tracker-container .navbar,
.life-tracker-container .offcanvas {
    display: none !important;
}

/* Additional rules to ensure navigation is hidden on life tracker */
body.life-tracker-page {
    padding-top: 0 !important;
}

/* Hide any remaining navigation elements */
body.life-tracker-page .navbar,
body.life-tracker-page .offcanvas,
body.life-tracker-page nav {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
}

/* Ensure life tracker container takes full viewport */
body.life-tracker-page .life-tracker-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9999;
    background: #000;
}
