body.bg {
    background: url('bg.jpg') center/cover fixed;
    font-family: "Segoe UI", Tahoma, sans-serif;
    color: #222;
    margin: 0;
    padding: 0;
  }
  
  /* Login */
  .login-box {
    background: rgba(255,255,255,0.9);
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    width: 90%;
    max-width: 400px;
    margin: 10vh auto;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
  }
  
  .login-box select,
  .login-box input {
    width: 90%;
    padding: 0.6rem;
    margin: 0.4rem 0;
    border-radius: 8px;
    border: 1px solid #ccc;
    font-size: 1rem;
  }
  
  .login-box button {
    background: linear-gradient(135deg, #5c7cfa, #364fc7);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 0.7rem 1rem;
    font-size: 1.1rem;
    cursor: pointer;
    width: 100%;
    transition: all 0.2s;
  }
  
  .login-box button:hover {
    transform: scale(1.05);
    background: linear-gradient(135deg, #748ffc, #5c7cfa);
  }

  .start-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 0.5rem;
  }
  .start-buttons button { width: 100%; }
  .btn-fakta {
    background: linear-gradient(135deg, #0ca678, #087f5b) !important;
  }
  .btn-fakta:hover {
    background: linear-gradient(135deg, #20c997, #0ca678) !important;
  }
  .btn-berattande {
    background: linear-gradient(135deg, #7950f2, #5f3dc4) !important;
  }
  .btn-berattande:hover {
    background: linear-gradient(135deg, #9775fa, #7950f2) !important;
  }
  .btn-ordtest {
    background: linear-gradient(135deg, #0ca678, #087f5b) !important;
  }
  .btn-ordtest:hover {
    background: linear-gradient(135deg, #20c997, #0ca678) !important;
  }
  .btn-ordjakt {
    background: linear-gradient(135deg, #9775fa, #7950f2) !important;
  }
  .btn-ordjakt:hover {
    background: linear-gradient(135deg, #b197fc, #9775fa) !important;
  }

  /* Top banner */
  .top-bar {
    display: flex;
    justify-content: space-around;
    background: #364fc7;
    color: white;
    padding: 0.8rem;
    font-weight: bold;
    box-shadow: 0 3px 8px rgba(0,0,0,0.3);
  }
  
  /* Reading container */
  .reading-container {
    background: rgba(255,255,255,0.95);
    color: #111;
    padding: 2rem;
    border-radius: 15px;
    width: 90%;
    max-width: 650px;
    margin: 2rem auto;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
  }
  
  .reading-text {
    background: white;
    padding: 1rem;
    border-radius: 10px;
    border: 2px solid #e5e5e5;
    margin-bottom: 1rem;
    line-height: 1.6;
    
    /* 🧠 Nytt för scroll och responsivitet */
    max-height: 50vh;       /* maxhöjd = halva skärmen */
    overflow-y: auto;        /* visar scroll om texten blir lång */
    overscroll-behavior: contain;  /* hindrar att hela sidan scrollar när man når slutet */
  }
  
  #readingText::after {
    content: " ";
    display: block;
    height: 2px;
    background: #ddd;
    margin: 18px 0;
  }
  
  .answer-btn {
    background: linear-gradient(135deg, #5c7cfa, #364fc7);
    color: white;
    border: none;
    border-radius: 8px;
    margin: 0.4rem;
    padding: 0.6rem 1rem;
    cursor: pointer;
    font-size: 1rem;
    transition: transform 0.1s, background 0.2s;
  }
  
  .answer-btn:hover {
    transform: scale(1.05);
    background: linear-gradient(135deg, #748ffc, #5c7cfa);
  }
  
  .progress {
    text-align: center;
    margin-top: 1rem;
    color: #333;
  }
  
  .main-btn {
    background: linear-gradient(135deg, #1cc88a, #17a673);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 0.8rem 1.2rem;
    cursor: pointer;
    font-size: 1.1rem;
    transition: transform 0.2s;
  }
  
  .main-btn:hover {
    transform: scale(1.05);
  }
  .category-tag {
    position: absolute;
    top: 10px;
    right: 15px;
    background: #eee;
    color: #333;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.8em;
    opacity: 0.8;
  }
  
  .popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 999;
  }
  
  .popup-box {
    background: white;
    padding: 30px;
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 0 20px rgba(0,0,0,0.3);
    max-width: 300px;
  }
  
  .popup-box h2 {
    margin-bottom: 10px;
  }
  .shop-btn {
    margin-left: 10px;
    padding: 5px 12px;
    background: #ff9f1c;
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 1.1rem;
    cursor: pointer;
    transition: transform 0.15s;
  }
  
  .shop-btn:hover {
    transform: scale(1.12);
    background: #ff7f0e;
  }
  .coins-box {
    font-weight: 700;
    color: #b45309; /* varm guldig brun */
  }
  