/* --- 0. SPLIT NAVBAR SETTINGS --- */
:root{
    /* --- 1. SETTINGS --- */
    --bg-color: #1a1a1d;
    --card-width: 200px;
    --card-ratio: 4/5;
    --accent: #ffffff;
    --text-color: #ffffff;
    --grid-line-color: rgba(255, 255, 255, 0.08);
    --grid-size: 50px;
}

    .floating-nav {
      position: fixed;
      top: 24px;
      left: 50%;
      transform: translateX(-50%);
      display: grid;
      grid-template-columns: auto 1fr auto;
      align-items: center;
      gap: 0px;
      z-index: 1000;
      pointer-events: none;
    }

    .nav-capsule {
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 8px 10px;
      background: rgba(255,255,255,0.03);
      /* backdrop-filter: blur(12px); */
      border-radius: 8px;
      border: 1px solid rgba(255,255,255,0.07);
      box-shadow: 0 8px 24px rgba(0,0,0,0.25);
      pointer-events: auto;
    }

    .nav-inner {
      display: flex;
      align-items: center;
      gap: 2px;
      padding: 10px 10px;
      border-radius: 6px;
      transition: background 0.2s ease, opacity 0.2s ease;
    }

    .nav-inner:hover {
      background: rgba(255,255,255,0.15);
      color: white;
      outline: none;
    }

    .nav-left {
      display: flex;
      gap: 12px;
    }

    .nav-button {
      cursor: pointer;
      white-space: nowrap;
    }

    .nav-button:hover {
      background: rgba(255,255,255,0.15);
      color: white;
      outline: none;
    }

    /* Hamburger icon animation */
    #hamburgerIcon {
      transition: transform 0.3s ease, opacity 0.2s ease;
    }

    .icon-rotated {
      transform: rotate(90deg);
    }

    .nav-center-text {
      font-weight: 300;
      letter-spacing: 4px;
      text-transform: uppercase;
      opacity: 0.3;
      text-align: center;
      font-size: 2.5em;
      color: white;
      margin: 0 32px;
      /* letter-spacing: 0.25em; */
      opacity: 0.3;
      pointer-events: none;
      user-select: none;
      white-space: nowrap;
    }

    .nav-right a {
      display: flex;
      align-items: center;
      gap: 6px;
      color: white;
      text-decoration: none;
      font-size: 14px;
      transition: background 0.2s ease, opacity 0.2s ease;
    }

    /* Sidebar */
    .sidebar {
    position: fixed;
    top: 24px;
    left: 20px;

    width: 200px;
    max-width: 280px;

    background: rgba(255,255,255,0.03);
    /* backdrop-filter: blur(16px); */
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.07);
    box-shadow: 0 8px 24px rgba(0,0,0,0.25);

    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;

    transform: translateX(-120%);
    transition: transform 0.3s ease;
    z-index: 999;
    }


    .sidebar.open {
      transform: translateX(0);
    }

    .sidebar h2 {
      margin: 0 0 8px 0;
      font-size: 12px;
      letter-spacing: 0.25em;
      opacity: 0.6;
    }

    .sidebar a {
      display: flex;
      align-items: center;
      padding: 10px 12px;
      border-radius: 8px;
      color: white;
      text-decoration: none;
      font-size: 14px;
      transition: background 0.2s ease, opacity 0.2s ease;
    }

    .sidebar a:hover {
      background: rgba(255,255,255,0.15);
      color: white;
      outline: none;
    }

    /* Overlay */
    .overlay {
      position: fixed;
      inset: 0;
      background: rgba(0,0,0,0.4);
      opacity: 0;
      pointer-events: none;
      transition: opacity 0.3s ease;
      z-index: 998;
    }

    .overlay.active {
      opacity: 1;
      pointer-events: auto;
    }

/* --- BODY AND BACKGROUND --- */
body {
    margin: 0;
    padding: 0;
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'Segoe UI', sans-serif;
    height: 100vh;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* --- Background Grid --- */
.board-bg {
    position: absolute;
    width: 100%;
    height: 100%;
    background-color: #1a1a1d; 
    z-index: 0; 
    pointer-events: none;

    /* Base Grid Definition */
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px);
    background-size: 50px 50px;

    /* Apply the final static filter for the wavy look */
    filter: url(#wavy-distortion);
}

/* --- 2. THE BOARD INFO PANEL --- */
.board-info {
    position: fixed;
    top: 30%;
    left: 60%;
    transform: translateY(-50%) translateX(100px);
    
    /* Adjusted width to allow longer titles */
    width: 380px; 
    
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.6s ease-in-out 0.2s, transform 0.6s ease-in-out 0.2s; 
    z-index: 5;
}

.board-info.active {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(-50%) translateX(0); 
}

.board-info h2 {
    font-size: 2.5rem;
    color: var(--accent);
    margin: 0 0 10px 0;
    text-transform: uppercase;
}

.board-info p {
    line-height: 1.6;
    color: #ccc;
    font-size: 1rem;
}

.action-btn {
    margin-top: 20px;
    padding: 10px 24px;
    background: transparent;
    border: 2px solid var(--accent);
    color: var(--accent);
    font-weight: bold;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: 0.2s;
    text-decoration: none;
    display: inline-block;
}

.action-btn:hover {
    background: var(--accent);
    color: var(--button-text-color, #000);
}

/* --- 3. THE HAND CONTAINER --- */
.hand-wrapper {
    position: fixed;
    bottom: -30px;
    width: 100%;
    height: 300px;
    display: flex;
    justify-content: center;
    z-index: 10;
}

/* --- 4. THE CARD --- */
.card {
    position: absolute;
    width: var(--card-width);
    aspect-ratio: var(--card-ratio);
    background: #222;
    border-radius: 12px;
    border: 4px solid white;
    box-shadow: -10px 10px 20px rgba(0,0,0,0.5);
    cursor: pointer;
    transition: all 0.6s cubic-bezier(0.25, 0.8, 0.25, 1);
    transform-origin: center center; 
    will-change: transform;
    overflow: hidden;
}

.card img {
    width: 100%; height: 100%; object-fit: cover; pointer-events: none;
}

.card:not(.played):hover {
    transform: translateY(-70px) scale(1.1) !important;
    z-index: 100;
    box-shadow: 0 0 20px var(--accent);
    border-color: var(--accent);
}

/* --- 5. THE 'PLAYED' STATE --- */
.card.played {
    position: fixed !important;
    top: 40% !important;
    left: 40% !important;
    bottom: auto !important;
    margin-left: 0 !important; 
    z-index: 1000 !important;
    box-shadow: 0 30px 60px rgba(0,0,0,0.8);
    border-color: var(--accent);
    cursor: default;
    transition: all 0.6s cubic-bezier(0.25, 0.8, 0.25, 1);
}