
  /* متغيرات الثيم الداكن */
  :root {
    --bg: #121212;
    --surface: #1e1e1e;
    --card: #242424;
    --text-main: #cf567c;
    --text-secondary: #a0a0a0;
    --accent: #252323;
    --border: #333;
    --shadow: rgba(0, 0, 0, 0.5);
    --focus: #682b3f;
    --error-bg: #1e1e1e;
    --error-text: #f88;
  }

  * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
  }

  html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
  }

  body {
    font-family: 'Segoe UI', 'Tahoma', Arial, sans-serif;
    background: var(--bg);
    color: var(--text-main);
    direction: rtl;
    line-height: 1.6;
    font-weight: 400;
    overflow-x: hidden;
  }

  *:focus {
    outline: 3px solid var(--focus);
    outline-offset: 2px;
  }

  .sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  .header {
    background: linear-gradient(135deg, #1f1f1f 0%, #181818 100%);
    padding: 20px 0;
    text-align: center;
    box-shadow: 0 4px 20px var(--shadow);
    position: relative;
    z-index: 100;
  }

  .header a {
    color: var(--text-main);
    text-decoration: none;
    font-size: clamp(26px, 5vw, 34px);
    font-weight: 700;
    text-shadow: 1px 1px 4px var(--shadow);
    transition: all 0.3s ease;
  }

  .header a:hover {
    color: #fff;
    transform: scale(1.05);
  }

  .header b {
    color: var(--text-secondary);
    font-size: clamp(14px, 2.5vw, 18px);
    display: block;
    margin-top: 8px;
    opacity: 0.8;
  }

  .nav {
    background: rgba(30, 30, 30, 0.9);
    text-align: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(10px);
    white-space: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .nav::-webkit-scrollbar {
    height: 3px;
  }
  .nav::-webkit-scrollbar-track {
    background: transparent;
  }
  .nav::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 2px;
  }

  .nav a {
    padding: 10px 16px;
    color: var(--text-main);
    font-size: clamp(13px, 2.2vw, 15px);
    border-left: 1px solid var(--border);
    display: inline-block;
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 500;
    white-space: nowrap;
  }
  .nav a:first-child {
    border-left: none;
  }
  .nav a:hover,
  .nav a:focus {
    background: var(--accent);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--shadow);
  }

  .main {
    max-width: 1200px;
    margin: 20px auto;
    padding: 0 20px;
    text-align: center;
  }

  .hero-section {
    background: var(--surface);
    color: #fff;
    padding: clamp(35px, 7vw, 60px) 25px;
    border-radius: 20px;
    margin: 30px 0;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px var(--shadow);
  }
  .hero-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.2);
    z-index: 1;
  }
  .hero-content {
    position: relative;
    z-index: 2;
  }
  .logo-icon {
    width: clamp(60px, 12vw, 75px);
    height: clamp(60px, 12vw, 75px);
    margin: 0 auto 20px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: clamp(1.8rem, 4vw, 2.2rem);
    backdrop-filter: blur(10px);
    border: 3px solid rgba(255,255,255,0.2);
    transition: all 0.4s ease;
  }
  .logo-icon:hover {
    transform: scale(1.1) rotate(10deg);
    background: rgba(255,255,255,0.2);
  }
  .hero-content h1 {
    font-size: clamp(1.8rem, 5vw, 2.4rem);
    margin-bottom: 15px;
    text-shadow: 1px 1px 6px var(--shadow);
    font-weight: 700;
    line-height: 1.2;
  }
  .hero-content p {
    font-size: clamp(1rem, 3vw, 1.3rem);
    margin-bottom: 25px;
    opacity: 0.9;
    line-height: 1.7;
    max-width: 600px;
    margin-inline: auto;
  }

  .error-404 {
    background: linear-gradient(135deg, #660000 0%, #440000 100%);
    color: #fff;
    padding: clamp(30px, 6vw, 50px) 25px;
    border-radius: 20px;
    margin: 30px auto;
    max-width: 600px;
    text-align: center;
    box-shadow: 0 10px 25px var(--shadow);
  }
  .error-404 .error-icon {
    font-size: clamp(2.5rem, 6vw, 3.5rem);
    margin-bottom: 15px;
    display: block;
  }
  .error-404 h1 {
    font-size: clamp(1.5rem, 4vw, 2.2rem);
    margin-bottom: 12px;
    font-weight: 700;
  }
  .error-404 p {
    font-size: clamp(1rem, 2.8vw, 1.2rem);
    opacity: 0.9;
    margin-bottom: 25px;
  }
  .error-404 .back-link {
    display: inline-block;
    background: rgba(255,255,255,0.1);
    color: #fff;
    padding: 12px 25px;
    border-radius: 25px;
    border: 2px solid rgba(255,255,255,0.2);
    font-weight: 600;
    transition: all 0.3s ease;
  }
  .error-404 .back-link:hover {
    background: rgba(255,255,255,0.2);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--shadow);
  }

  .login-section {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: clamp(30px, 6vw, 40px);
    margin: 40px auto;
    max-width: 550px;
    box-shadow: 0 10px 30px var(--shadow);
    position: relative;
  }
  .login-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-bottom: 35px;
    flex-wrap: wrap;
  }
  .btn {
    padding: 15px 30px;
    border: none;
    border-radius: 30px;
    font-size: clamp(16px, 3vw, 18px);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    background: var(--card);
    color: var(--text-main);
    position: relative;
    overflow: hidden;
  }
  .btn::before {
    content: '';
    position: absolute;
    inset: 0;
    margin: auto;
    width: 0;
    height: 0;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    transition: width 0.6s, height 0.6s;
  }
  .btn:active::before {
    width: 300px;
    height: 300px;
  }
  .btn-guest {
    background: #252323;
  }
  .btn-member {
    background: var(--accent);
  }
  .btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px var(--shadow);
  }

  .login-form {
    display: none;
    background: var(--card);
    border: 1px solid var(--border);
    padding: 30px;
    border-radius: 15px;
    margin-top: 25px;
    animation: fadeIn 0.4s ease-in-out;
  }
  @keyframes fadeIn {
    from { opacity: 0; transform: translateY(15px); }
    to   { opacity: 1; transform: translateY(0); }
  }

  .form-group {
    margin-bottom: 25px;
  }
  .form-input {
    width: 100%;
    padding: 18px;
    text-align: center;
    font-size: clamp(16px, 3.5vw, 18px);
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
    color: var(--text-main);
    transition: all 0.3s ease;
  }
  .form-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(55,124,168,0.2);
    transform: translateY(-2px);
  }
  .form-input::placeholder {
    color: var(--text-secondary);
    opacity: 1;
  }

  .submit-btn {
    width: 100%;
    padding: 18px;
    font-size: clamp(18px, 3.5vw, 20px);
    background: #5e293a;
    color: #fff;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
  }
  .submit-btn:hover {
    background: darken(var(--accent), 10%);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px var(--shadow);
  }
  .submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
  }

  .error {
    background: var(--error-bg);
    color: var(--error-text);
    padding: 18px;
    border-radius: 12px;
    margin-bottom: 25px;
    text-align: center;
    font-weight: 600;
    animation: shake 0.5s ease-in-out;
  }

  @keyframes shake {
    0%,100% { transform: translateX(0); }
    25%     { transform: translateX(-8px); }
    75%     { transform: translateX(8px); }
  }

  .content-section {
    background: var(--surface);
    padding: clamp(35px, 7vw, 50px) 30px;
    margin: 35px 0;
    border-radius: 20px;
    box-shadow: 0 4px 20px var(--shadow);
    border: 1px solid var(--border);
  }
  .section-title {
    font-size: clamp(1.6rem, 4.5vw, 2.2rem);
    color: var(--text-main);
    background: var(--card);
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 25px;
    font-weight: 700;
  }
  .section-content {
    font-size: clamp(1rem, 2.8vw, 1.2rem);
    line-height: 1.8;
    color: var(--text-secondary);
    margin-inline: auto;
    max-width: 800px;
  }
  .section-content p {
    margin-bottom: 1.2rem;
  }

  .features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin: 40px 0;
    padding: 0 15px;
  }
  .feature-card {
    background: var(--card);
    padding: 30px 25px;
    border-radius: 20px;
    border: 1px solid var(--border);
    text-align: center;
    transition: all 0.4s ease;
    box-shadow: 0 4px 15px var(--shadow);
    position: relative;
    overflow: hidden;
  }
  .feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.6s;
  }
  .feature-card:hover::before {
    left: 100%;
  }
  .feature-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px var(--shadow);
    border-color: var(--accent);
  }
  .feature-icon {
    font-size: clamp(2.5rem, 6vw, 3rem);
    margin-bottom: 20px;
    color: var(--accent);
  }
  .feature-title {
    font-size: clamp(1.2rem, 3.5vw, 1.5rem);
    color: var(--text-main);
    margin-bottom: 15px;
    font-weight: 700;
  }
  .feature-desc {
    color: var(--text-secondary);
    line-height: 1.7;
    font-size: clamp(0.95rem, 2.2vw, 1.1rem);
  }

  .footer {
    background: var(--surface);
    padding: 40px 25px 25px;
    margin-top: 50px;
    text-align: center;
    border-top: 1px solid var(--border);
  }
  .footer-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 30px;
  }
  .footer-links a {
    padding: 14px 22px;
    background: var(--card);
    color: var(--text-main);
    text-decoration: none;
    border-radius: 12px;
    border: 1px solid var(--border);
    transition: all 0.3s ease;
    font-weight: 600;
  }
  .footer-links a[aria-current="page"] {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 6px 20px var(--shadow);
  }
  .footer-links a:hover,
  .footer-links a:focus {
    background: var(--accent);
    color: #fff;
  }
  .footer-links a::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.6s;
  }
  .footer-links a:hover::before {
    left: 100%;
  }

  .copyright {
    font-size: clamp(13px, 2.2vw, 15px);
    color: var(--text-secondary);
    line-height: 1.6;
    margin-top: 25px;
  }

  .loading {
    display: inline-block;
    width: 22px;
    height: 22px;
    border: 3px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
  }
  @keyframes spin {
    to { transform: rotate(360deg); }
  }

  /* تجاوب */
  @media screen and (max-width: 768px) {
    .login-buttons { flex-direction: column; }
    .btn { width: 100%; max-width: 280px; }
  }
  @media screen and (max-width: 480px) {
    html { font-size: 14px; }
    .nav a { padding: 6px 8px; font-size: 11px; }
  }


