/* Base styles and variables - matching with header colors */
:root {
    --border-radius: 12px;
    --box-shadow: var(--glass-panel-shadow);
    --transition: all 0.3s ease;
  }
  
  * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  }
  
  body {
    background-color: var(--background-color);
    min-height: 100vh;
    color: var(--glass-panel-text);
  }
  
  .center-wrapper {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px 20px;
    min-height: calc(100vh - 60px);
  }
  
  /* Login and Registration container styling */
  .login-container,
  .registration-container {
    background-color: var(--glass-panel-bg-strong);
    border-radius: var(--border-radius);
    box-shadow: var(--glass-panel-shadow-strong);
    width: 100%;
    max-width: 400px;
    padding: 32px;
    text-align: center;
    position: relative;
    overflow: hidden;
    border: 1px solid var(--glass-panel-border-strong);
    backdrop-filter: blur(var(--glass-panel-blur));
    -webkit-backdrop-filter: blur(var(--glass-panel-blur));
  }
  
  .login-container::before,
  .registration-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(to right, var(--header-color), var(--secondary-color));
  }
  
  .login-container h2,
  .registration-container h2 {
    color: var(--glass-panel-text);
    margin-bottom: 25px;
    font-size: 28px;
    position: relative;
    display: inline-block;
  }
  
  .login-container h2::after,
  .registration-container h2::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 3px;
    background-color: var(--primary-color);
    border-radius: 3px;
  }
  
  /* Form styling */
  .login-form,
  .registration-form {
    margin-bottom: 20px;
  }
  
  .login-form input,
  .registration-form input,
  .registration-form select {
    width: 100%;
    padding: 12px 15px;
    margin-bottom: 15px;
    border: 1px solid var(--glass-panel-border);
    border-radius: var(--border-radius);
    font-size: 16px;
    transition: var(--transition);
    background-color: var(--input-color);
    color: var(--glass-panel-text);
  }

  /* Password toggle styling */
  .password-wrapper {
    position: relative;
    width: 100%;
    margin-bottom: 15px;
  }

  .password-wrapper input {
    margin-bottom: 0;
    padding-right: 45px;
  }

  .password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    font-size: 20px;
    padding: 5px;
    user-select: none;
    transition: transform 0.2s ease;
  }

  .password-toggle:hover {
    transform: translateY(-50%) scale(1.1);
  }

  .password-toggle:active {
    transform: translateY(-50%) scale(0.95);
  }
  
  .login-form input:focus,
  .registration-form input:focus,
  .registration-form select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(124, 77, 255, 0.18);
  }
  
  .login-button,
  .register-button {
    width: 100%;
    padding: 12px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    margin-top: 10px;
    box-shadow: 0 10px 30px rgba(124, 77, 255, 0.25);
  }
  
  .login-button:hover,
  .register-button:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
  }
  
  .login-button:active,
  .register-button:active {
    transform: translateY(0);
  }
  
  /* Links styling */
  .register-text {
    margin: 20px 0 10px;
    color: var(--text-color);
    font-weight: 500;
  }

  .remember-me-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--text-color);
    margin: 4px 0 12px;
    cursor: pointer;
  }

  .remember-me-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--primary-color);
    cursor: pointer;
  }

  .login-legal {
    margin: 16px 0 4px;
    font-size: 12px;
    color: var(--light-text, #9ca3af);
    text-align: center;
  }

  .login-legal .register-link {
    font-size: 12px;
    font-weight: 400;
  }
  
  .register-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    display: inline-block;
    margin: 5px 0;
  }
  
  .register-link:hover {
    color: var(--primary-dark);
    text-decoration: underline;
  }
  
  /* Flash messages */
  .flash-message {
    background-color: rgba(255, 111, 97, 0.18);
    color: var(--glass-panel-text);
    padding: 12px;
    border-radius: var(--border-radius);
    margin-top: 20px;
    animation: fadeIn 0.5s ease;
    border: 1px solid rgba(255, 111, 97, 0.35);
  }
  
  @keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
  }

  /* ── Google OAuth Button ──────────────────────────────────────────────── */
  .oauth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 18px 0 14px;
    color: var(--light-text, #9ca3af);
    font-size: 13px;
  }

  .oauth-divider::before,
  .oauth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--glass-panel-border);
  }

  .google-login-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 11px 16px;
    background-color: var(--glass-panel-bg-strong, #fff);
    color: var(--glass-panel-text);
    border: 1px solid var(--glass-panel-border-strong);
    border-radius: var(--border-radius);
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: var(--transition);
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    margin-bottom: 6px;
  }

  .google-login-button:hover {
    box-shadow: 0 4px 16px rgba(66,133,244,0.22);
    border-color: #4285F4;
    transform: translateY(-1px);
    text-decoration: none;
  }

  .google-login-button:active {
    transform: translateY(0);
  }

  .google-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
  }
  /* ── Ende Google OAuth Button ────────────────────────────────────────── */
  
  /* Registration specific styles */
  .registration-form label {
    display: block;
    text-align: left;
    margin-bottom: 5px;
    color: var(--text-color);
  }
  
  .select-container {
    position: relative;
    margin-bottom: 15px;
  }
  
  .select-container::after {
    content: '\25BC';
    position: absolute;
    top: 50%;
    right: 15px;
    transform: translateY(-50%);
    pointer-events: none;
    color: var(--text-color);
  }
  
  .registration-form select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-color: var(--input-color);
    cursor: pointer;
  }
  
  .captcha-image {
    width: 100%;
    margin-bottom: 15px;
    border-radius: var(--border-radius);
    border: 1px solid var(--glass-panel-border);
  }
  
  /* Password validation message */
  .password-validation-message {
    color: var(--secondary-color);
    font-size: 14px;
    margin-top: -10px;
    margin-bottom: 10px;
    text-align: left;
  }

  /* Password strength requirements checklist */
  .pw-requirements {
    background: var(--input-color);
    border: 1px solid var(--glass-panel-border);
    border-radius: 6px;
    padding: 0.55rem 0.9rem;
    margin: -4px 0 10px 0;
    font-size: 0.82rem;
    line-height: 1;
  }
  .pw-req {
    color: var(--error-color, #ff5252);
    line-height: 1.75;
    transition: color 0.2s;
  }
  .pw-req.pw-ok {
    color: var(--success-color, #4caf50);
  }

  /* Role toggle (Athlet / Trainer) */
  .role-toggle {
    display: flex;
    gap: 0;
    margin-bottom: 1.5rem;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--glass-panel-border);
  }
  .role-toggle label {
    flex: 1;
    text-align: center;
    padding: 0.65rem 1rem;
    cursor: pointer;
    background: var(--input-color);
    color: var(--glass-panel-text);
    font-size: 0.95rem;
    transition: background 0.2s, color 0.2s;
    user-select: none;
    margin: 0;
  }
  .role-toggle label:not(:last-child) {
    border-right: 1px solid var(--glass-panel-border);
  }
  .role-toggle input[type="radio"] { display: none; }
  .role-toggle input[type="radio"]:checked + label {
    background: var(--primary-color);
    color: #fff;
    font-weight: 600;
  }

  /* Invite banner (dark-mode-aware) */
  .invite-banner {
    background: var(--input-color);
    border-left: 4px solid var(--primary-color);
    border-radius: 6px;
    padding: 0.9rem 1.1rem;
    margin-bottom: 1.25rem;
    font-size: 0.92rem;
    color: var(--glass-panel-text);
    line-height: 1.5;
  }
  .invite-banner strong {
    display: block;
    margin-bottom: 0.2rem;
    font-size: 1rem;
  }

  /* Consent checkbox row */
  .consent-wrapper {
    text-align: left;
    margin: 10px 0 6px;
  }
  .consent-label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 0.88rem;
    color: var(--glass-panel-text);
    cursor: pointer;
    line-height: 1.4;
  }
  .consent-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    margin-top: 2px;
    accent-color: var(--primary-color);
    cursor: pointer;
  }
  
  /* Responsive adjustments */
  @media (max-width: 768px) {
    .center-wrapper {
      padding: 20px;
    }
    
    .login-container,
    .registration-container {
      padding: 20px;
    }
    
    .login-container h2,
    .registration-container h2 {
      font-size: 24px;
    }
    
    .login-form input,
    .login-button,
    .registration-form input,
    .registration-form select,
    .register-button {
      padding: 10px;
      font-size: 14px;
    }
  }

  /* Role selection styles */
  .role-choice-container {
    max-width: 480px;
  }

  .role-choice-hint {
    color: var(--text-color);
    margin-bottom: 20px;
  }

  .role-choice-form {
    margin: 0;
  }

  .role-choice-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
    text-align: left;
  }

  .role-choice-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: var(--border-radius);
    border: 1px solid var(--glass-panel-border);
    background-color: rgba(255, 255, 255, 0.05);
    cursor: pointer;
    transition: var(--transition);
  }

  .role-choice-option:hover {
    border-color: var(--primary-color);
    box-shadow: 0 8px 20px rgba(124, 77, 255, 0.18);
  }

  .role-choice-option input {
    accent-color: var(--primary-color);
  }

  .role-choice-option span {
    font-weight: 600;
    color: var(--glass-panel-text);
  }

  .role-choice-option small {
    color: var(--text-color);
    font-size: 13px;
    display: block;
    line-height: 1.4;
  }

  .role-choice-messages {
    width: 100%;
    margin-top: 8px;
  }

  .role-choice-meta {
    color: var(--text-color);
    font-size: 13px;
    margin-top: 16px;
  }