  :root {
    --bg: rgb(8, 11, 13);
    --panel: rgb(11, 13, 16);
    --text: #E6E6E6;
    --muted: #B5B5B5;
    --accent: #00aeff;
    --glass: rgb(255, 255, 255, 0.03);
    --border: rgb(60, 60, 60);
    --radius: 20px;
  }

  * {box-sizing: border-box; outline: none;}

  body { 
    margin: 0;
    font-family: 'Radio Canada Big', sans-serif;
    background: url(assets/image/background.jpg) center / cover no-repeat fixed;
    color: var(--text);
    padding-top: 60px;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    scrollbar-width: 0;
  }

  body::-webkit-scrollbar {
  display: none;
  }

  h1, h2, p, span{
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
  }

  a, a:hover, a:active{
    color: var(--accent);
  }

  .top-history {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50px;
    background: transparent;
    backdrop-filter: blur(5px); 
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.3),
                inset 0 0 8px rgba(255, 255, 255, 0.15);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    padding: 0 20px;
    z-index: 1000;
    overflow-x: auto;
    gap: 12px; 
    scrollbar-width: none;
  }

  .top-history::-webkit-scrollbar {display: none;}
  
  .history-node {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 4px;
    background: transparent;
    backdrop-filter: blur(10px) brightness(0.8); 
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.3),
                inset 0 0 6px rgba(255, 255, 255, 0.15);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    border: 1px solid var(--border);
    animation: slideInTop 0.5s cubic-bezier(0.18, 0.89, 0.32, 1.28);
    transition: box-shadow 0.3s;
  }

  @keyframes slideInTop { 
    from { transform: translateY(-100%); opacity: 0; } 
    to { transform: translateY(0); opacity: 1; } 
  }

  .page-container {
    width: 90%;
    margin: 0 auto;
    flex: 1;
    display: flex;
    flex-direction: column;
  }

  .case-card {
  display: flex; 
  flex-direction: column; 
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  background: transparent;
  backdrop-filter: blur(5px);
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.3),
              inset 0 0 10px rgba(255, 255, 255, 0.15);
  outline: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 30px;
  text-align: center;
  text-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
  cursor: pointer;
  transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), 
              outline 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), 
              box-shadow 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  }

  .case-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.3), 
              0 0 30px rgba(0, 174, 255, 0.5),
              inset 0 0 30px rgba(0, 174, 255, 0.7);
  outline: 1px solid var(--accent);
  }

  .case-card.is-new {
    outline: 1px solid rgba(255, 217, 0, 0.6);
  }

  .case-card.is-new h3 {
    color: #FFD700;
    text-shadow: 0 0 20px rgba(255, 217, 0, 0.5);
  }

  .case-card.is-new:hover {
  outline: 1px solid #FFD700;
  transform: translateY(-6px);
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.3), 
              0 0 25px rgba(255, 217, 0, 0.5),
              inset 0 0 15px rgba(255, 217, 0, 0.7);
  }

  .case-card.is-new::before {
  content: "NOVĚ V CS2!";
  position: absolute;
  top: 10px;
  right: 10px;
  color: #FFD700;
  text-shadow: 0 0 10px rgba(255, 217, 0, 0.7);
  font-size: 11px;
  font-weight: 800;
  padding: 2px 6px;
  z-index: 10;
  }

  .drop-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.4), 
              0 0 16px var(--card-color);
  }

  #openBtn:enabled:hover, #resetBtn:enabled:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.3), 
              0 0 18px rgba(0, 174, 255, 0.75);
  }

  .btn-red {
  background-color: #EE4444 !important;
  border-color: #EE4444 !important;
  color: var(--text) !important;
  }

  .btn-red:hover {
  background-color: #EE4444 !important;
  box-shadow: 0 0 18px rgba(238, 68, 68, 0.6) !important;
  transform: translateY(-2px);
  }

  .btn-generic{
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border);
    padding: 8px 16px;
    display: flex;
    align-items: center;
    gap: 6px;
    backdrop-filter: blur(5px);
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.3),
                inset 0 0 5px rgba(255, 255, 255, 0.175);
    border-radius: var(--radius);
    font-weight: 800;
    font-size: 14px;
    cursor: pointer;
    transition: 0.3s;
  }

  .btn-generic:enabled:hover {
  transform: translateY(-4px);
  box-shadow: 0 0 10px rgb(45, 45, 45),
              inset 0 0 5px rgba(255, 255, 255, 0.175)
              !important;
  }

  .filter-chip {cursor: pointer;}

  .filter-chip input {display: none;}

  .chip-label {
    display: flex;
    align-items: center;
    padding: 8px 16px;
    background: transparent;
    backdrop-filter: blur(10px);
    border: 1px solid var(--border);
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.3),
                inset 0 0 5px rgba(255, 255, 255, 0.175);
    border-radius: var(--radius);
    color: var(--muted);
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s ease;
    user-select: none;
    gap: 6px;
  }

  .filter-chip input:checked + .chip-label {
    background: rgba(0, 174, 255, 0.05);
    border-color: var(--accent);
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.3),
                inset 0 0 10px rgba(0, 174, 255, 0.5);
    color: var(--text);
  }

  .filter-chip:hover .chip-label {
    background: rgba(255, 255, 255, 0.05);
  }

  .filter-icon {
  width: 20px;
  height: 20px;
  object-fit: contain;
  transform: translateY(1px);
  }

  .spinners-container { 
    width: 100%;
    margin: 24px auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    position: relative;
    z-index: 10;
  }

  .spinner-instance { 
    position: relative;
    height: 150px;
    overflow: hidden;
    width: 100%;
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 30%, black 70%, transparent 100%);
    mask-image: linear-gradient(to right, transparent 0%, black 30%, black 70%, transparent 100%);
  }

  .spinner-instance::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  z-index: 2;
  }

  .spinner-marker {
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 3px;
    height: 93%;
    background: var(--accent);
    transform: translateX(-50%); z-index: 5;
    box-shadow: 0 0 25px rgba(0, 174, 255, 0.6);
  }

  canvas.spin-canvas {
    width: 100%;
    height: 100%;
  }

  .controls-row { display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin: 30px 0;
  }

  .spin-counter {
    display: flex;
    align-items: center;
    background: transparent;
    backdrop-filter: blur(5px); 
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.3),
                inset 0 0 10px rgba(255, 255, 255, 0.1);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 6px;
    gap: 12px;
  }

  .counter-btn {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    border: none;
    background: transparent;
    backdrop-filter: blur(5px); 
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.5);
    color: var(--text);
    cursor: pointer;
    font-weight: 800;
    transition: 0.3s;
  }
    
  .counter-btn:enabled:hover {
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.3), 
              0 0 12px rgb(22, 25, 37);
  }
  
  .btn {
    background: var(--accent);
    color: var(--text);
    border: none;
    padding: 14px 30px;
    border-radius: var(--radius);
    font-weight: 800;
    font-size: 14px;
    cursor: pointer;
    transition: 0.3s;
  }

  .btn:disabled, .counter-btn:disabled {
    opacity: 0.25;
    filter: grayscale(0.5);
    cursor: not-allowed;
  }

  .case-content-area {
    margin-top: 40px;
    padding-bottom: 30px;
    position: relative;
    width: 100vw;
    left: 50%;
    transform: translateX(-50%);
    box-sizing: border-box;
    text-align: center;
    backdrop-filter: blur(10px)  contrast(1.025);
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.3),
                inset 0 0 15px rgba(255, 255, 255, 0.075);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
  }

  .drop-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    flex: 1;
    width: 87.5%;
    margin: 0 auto;
  }

  .drop-card {
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1)
  }

  .drop-card:hover .drop-card-odds {
    opacity: 1 !important;
  }

  .modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    transition: opacity 0.4s ease, transform 0.4s ease;
    opacity: 1;
    transform: translateY(0);
  }

  .modal-overlay.closing {
    opacity: 0;
    transform: translateY(50px);
    pointer-events: none;
  }

  .modal {
    background: rgba(10, 10, 10, 0.25);
    border: 1px solid var(--border);
    border-radius: 28px;
    padding: 40px;
    backdrop-filter: blur(10px);
    text-align: center;
    max-height: 95vh;
    overflow-y: auto;
    box-shadow: 0 0 160px rgb(0, 0, 0),
                inset 0 0 12px rgba(255, 255, 255, 0.15);
    width: fit-content;
    min-width: 350px;
    max-width: 95vw;
    margin: auto;
  }

  .results-list {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-start;
    gap: 15px;
    margin-top: 20px;
    width: 100%;
  }

  .result-row {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px;
    background: var(--glass);
    border-radius: 12px;
    border: 1px solid var(--border);
    text-align: left;
  }

  footer {
    width: 100%;
    padding: 10px 0;
    text-align: center;
    color: var(--muted);
    backdrop-filter: blur(10px);
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.3),
                inset 0 0 15px rgba(255, 255, 255, 0.075);
    font-size: 12px;
    font-style: italic;
    white-space: nowrap;
    border-top: 1px solid var(--border);
  }

  #particlesCanvas {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 2500; 
  }