* {
      margin: 0;
      padding: 0;
      box-sizing: border-box;
    }

    body {
      font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
      min-height: 100vh;
      display: flex;
      justify-content: center;
      align-items: center;
      padding: 20px;
      transition: background 0.3s ease;
    }

    body.dark {
      background: linear-gradient(135deg, #0a1124 0%, #1d2a47 100%);
    }

    body.light {
      background: linear-gradient(135deg, #f0f2f5 0%, #e4e7eb 100%);
    }

    .login-box {
      background-color: var(--box-bg, #121c33);
      padding: 2.5rem 2rem;
      border-radius: 12px;
      width: 100%;
      max-width: 450px;
      box-shadow: 0 4px 30px rgba(0, 0, 0, 0.6);
      transition: transform 0.3s ease, background-color 0.3s ease;
    }

    body.light .login-box {
      background-color: #ffffff;
    }

    .login-box:hover {
      transform: translateY(-5px);
    }

    .login-box h2 {
      text-align: center;
      color: var(--text-color, #fff);
      margin-bottom: 1.5rem;
      font-size: 1.8rem;
    }

    body.light .login-box h2 {
      color: #333;
    }

    .error-msg {
      text-align: center;
      color: #ff4d4d;
      margin-bottom: 1rem;
      font-size: 0.9rem;
      display: none;
      background: rgba(255, 77, 77, 0.1);
      padding: 0.5rem;
      border-radius: 5px;
    }

    .login-box input[type="text"],
    .login-box input[type="password"] {
      width: 100%;
      padding: 0.8rem 1rem;
      margin: 0.6rem 0;
      border: none;
      border-radius: 6px;
      background-color: var(--input-bg, #1d2a47);
      color: var(--input-text, white);
      font-size: 1rem;
      transition: background-color 0.3s ease;
    }

    body.light .login-box input[type="text"],
    body.light .login-box input[type="password"] {
      background-color: #f0f0f0;
      color: #333;
    }

    .login-box input:focus {
      outline: none;
      background-color: var(--input-focus-bg, #2a3b5e);
    }

    body.light .login-box input:focus {
      background-color: #e0e0e0;
    }

    .login-box input::placeholder {
      color: var(--placeholder-color, #aaa);
    }

    body.light .login-box input::placeholder {
      color: #666;
    }

    .button-group {
      display: flex;
      flex-direction: column;
      gap: 0.8rem;
      margin-top: 1.5rem;
    }

    .login-box button {
      padding: 0.8rem;
      border: none;
      border-radius: 6px;
      font-weight: bold;
      cursor: pointer;
      transition: all 0.3s ease;
      font-size: 1rem;
    }

    .login-box button.login-btn {
      background: linear-gradient(to right, #00d2ff, #0072ff);
      color: white;
    }

    .login-box button.login-btn:hover {
      background: linear-gradient(to right, #0072ff, #00d2ff);
      transform: scale(1.02);
    }

    .login-box button.create-btn {
      background: linear-gradient(to right, #ff6b6b, #ff2e63);
      color: white;
    }

    .login-box button.create-btn:hover {
      background: linear-gradient(to right, #ff2e63, #ff6b6b);
      transform: scale(1.02);
    }

    .theme-toggle {
      display: flex;
      justify-content: flex-end;
      margin-bottom: 1rem;
    }

    .theme-toggle button {
      background: none;
      border: none;
      color: var(--text-color, #fff);
      font-size: 1.2rem;
      cursor: pointer;
      padding: 0.5rem;
      border-radius: 50%;
      width: 2rem;
      height: 2rem;
      display: flex;
      align-items: center;
      justify-content: center;
      transition: background 0.3s ease;
    }

    body.light .theme-toggle button {
      color: #333;
    }

    .theme-toggle button:hover {
      background: rgba(0, 0, 0, 0.1);
    }

    @media (max-width: 600px) {
      .login-box {
        padding: 1.5rem;
        max-width: 90%;
      }

      .login-box h2 {
        font-size: 1.5rem;
      }

      .login-box button {
        padding: 0.7rem;
        font-size: 0.9rem;
      }
    }

    @media (max-width: 400px) {
      .login-box {
        padding: 1.2rem;
      }

      .login-box h2 {
        font-size: 1.3rem;
      }

      .login-box input[type="text"],
      .login-box input[type="password"] {
        padding: 0.7rem;
        font-size: 0.9rem;
      }
    }