@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@300;400;600&display=swap');

:root {
  --primary: #1e908f;
  --secondary: #5bd1c0;
  --bg: #f5fdfc;
  --dark: #222;
}

body {
  font-family: 'Vazirmatn', sans-serif;
  margin: 0;
  background: var(--bg);
  color: var(--dark);
  direction: rtl;
  text-align: right;
  line-height: 1.7;
}

/* Navbar */
.navbar {
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  padding: 15px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: white;
  flex-direction: row-reverse;
}

.navbar .logo {
  display: flex;
  align-items: center;
  font-weight: bold;
  font-size: 20px;
}

.navbar .logo-img {
  width: 35px;
  margin-left: 10px;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 20px;
  flex-direction: row-reverse;
}

.nav-links a {
  color: white;
  text-decoration: none;
  font-weight: 500;
  position: relative;
  transition: color 0.3s;
}
.nav-links a::after {
  content: "";
  position: absolute;
  bottom: -5px;
  right: 0;
  width: 0;
  height: 2px;
  background: white;
  transition: width 0.3s;
}
.nav-links a:hover::after {
  width: 100%;
}

/* دکمه‌ها */
.btn, .btn-signup, .btn-logout {
  background: var(--primary);
  color: white;
  padding: 10px 18px;
  border-radius: 8px;
  text-decoration: none;
  transition: background 0.3s, transform 0.2s;
}
.btn:hover, .btn-signup:hover, .btn-logout:hover {
  background: #166e6e;
  transform: translateY(-2px);
}
.btn-lg {
  padding: 12px 26px;
  font-size: 1.2rem;
}

/* Hero Section */
.hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 60px 20px;
  background: linear-gradient(135deg, #e6f8f7 0%, #ffffff 100%);
  border-radius: 20px;
  margin: 20px 0;
}
.hero-text {
  flex: 1;
  padding: 20px;
  animation: fadeInRight 1s ease;
}
.hero-text h1 {
  font-size: 2.2rem;
  color: var(--primary);
}
.hero-text .highlight {
  color: #166e6e;
  font-weight: 700;
}
.hero-img {
  flex: 1;
  text-align: center;
}
.hero-img img {
  max-width: 85%;
  animation: float 3s infinite ease-in-out;
}

/* Features */
.features {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin: 50px 0;
}
.feature-card {
  flex: 1;
  background: white;
  border-radius: 16px;
  padding: 25px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.08);
  text-align: center;
  transition: transform 0.3s, box-shadow 0.3s;
}
.feature-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.12);
}
.feature-card img {
  width: 60px;
  margin-bottom: 15px;
}
.feature-card h3 {
  margin: 10px 0;
  color: var(--primary);
}

/* Footer */
.footer {
  margin-top: 50px;
  background: var(--primary);
  color: white;
  text-align: center;
  padding: 15px;
  border-top-left-radius: 20px;
  border-top-right-radius: 20px;
}

/* انیمیشن‌ها */
@keyframes float {
  0% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
  100% { transform: translateY(0); }
}
@keyframes fadeInRight {
  from { opacity: 0; transform: translateX(50px); }
  to { opacity: 1; transform: translateX(0); }
}

/* بخش فرم ورود/ثبت‌نام */
.auth-section {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 60px 20px;
}

.auth-card {
  background: white;
  padding: 30px;
  border-radius: 16px;
  max-width: 420px;
  width: 100%;
  box-shadow: 0 8px 25px rgba(0,0,0,0.1);
  animation: fadeInDown 0.7s ease;
}

.auth-card h2 {
  text-align: center;
  margin-bottom: 20px;
  color: var(--primary);
}

.auth-card .form label {
  display: block;
  margin: 8px 0 4px;
  font-size: 0.9rem;
  font-weight: 600;
  color: #444;
}

.auth-card .form input {
  width: 100%;
  padding: 12px;
  margin-bottom: 15px;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 1rem;
  transition: border 0.3s;
}

.auth-card .form input:focus {
  border: 1px solid var(--primary);
  outline: none;
}

.auth-card .form button {
  width: 100%;
  padding: 12px;
  background: var(--primary);
  color: white;
  font-size: 1.1rem;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.3s, transform 0.2s;
}
.auth-card .form button:hover {
  background: #166e6e;
  transform: translateY(-2px);
}

.switch-auth {
  text-align: center;
  margin-top: 15px;
  font-size: 0.9rem;
}
.switch-auth a {
  color: var(--primary);
  text-decoration: none;
  font-weight: bold;
}
.switch-auth a:hover {
  text-decoration: underline;
}

/* انیمیشن */
@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-40px); }
  to { opacity: 1; transform: translateY(0); }
}

.alert {
  padding: 12px;
  margin-bottom: 15px;
  border-radius: 8px;
  font-size: 0.95rem;
  text-align: center;
}

.alert.error {
  background: #ffdddd;
  color: #a30000;
  border: 1px solid #a30000;
}

.alert.success {
  background: #ddffdd;
  color: #006600;
  border: 1px solid #006600;
}

.dashboard {
  padding: 40px 20px;
}

.dashboard h2 {
  margin-bottom: 30px;
  color: var(--primary);
}

.exam-section, .result-section {
  margin-bottom: 50px;
}

.exam-section h3, .result-section h3 {
  margin-bottom: 20px;
  color: #333;
  border-bottom: 2px solid var(--primary);
  display: inline-block;
  padding-bottom: 5px;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}

.card {
  background: #fff;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 6px 15px rgba(0,0,0,0.1);
  transition: transform 0.3s;
}

.card:hover {
  transform: translateY(-5px);
}

.card h4 {
  margin-bottom: 10px;
  color: var(--primary);
}

.card p {
  margin-bottom: 15px;
  font-size: 0.9rem;
  color: #555;
}

.card .btn {
  display: inline-block;
  padding: 10px 16px;
  background: var(--primary);
  color: #fff;
  border-radius: 8px;
  text-decoration: none;
  transition: background 0.3s;
}

.card .btn:hover {
  background: #166e6e;
}

.result-card .btn-secondary {
  background: #555;
}

.result-card .btn-secondary:hover {
  background: #333;
}

.page-title {
    text-align: center;
    margin-bottom: 20px;
    color: #1a73e8;
    font-weight: bold;
}

.profile-card {
    background: #fff;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    max-width: 500px;
    margin: 0 auto 20px auto;
    font-size: 16px;
    line-height: 1.8;
}

.profile-card p {
    margin: 10px 0;
}

.profile-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 40px;
}

.profile-actions .btn {
    padding: 10px 20px;
    border-radius: 8px;
    background: #1a73e8;
    color: #fff;
    text-decoration: none;
    font-weight: bold;
    transition: 0.3s;
}

.profile-actions .btn:hover {
    background: #155bb5;
}

.profile-actions .btn-danger {
    background: #e53935;
}

.profile-actions .btn-danger:hover {
    background: #c62828;
}

.dashboard-section {
    margin: 40px 0;
}

.dashboard-section h3 {
    margin-bottom: 20px;
    color: #1a73e8;
    font-weight: bold;
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
}

.card {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    text-align: center;
}

.card h4 {
    color: #333;
    margin-bottom: 10px;
}

.card p {
    margin: 5px 0;
    color: #666;
}

.card .btn {
    display: inline-block;
    margin-top: 10px;
    padding: 8px 15px;
    border-radius: 8px;
    background: #1a73e8;
    color: #fff;
    text-decoration: none;
    font-weight: bold;
    transition: 0.3s;
}

.card .btn:hover {
    background: #155bb5;
}


/* === تنظیمات کلی === */
body {
    font-family: 'Vazirmatn', sans-serif;
    background: #f4f9fb;
    margin: 0;
    padding: 0;
    color: #333;
}

.container {
    max-width: 500px;
    margin: 60px auto;
    background: #fff;
    padding: 30px;
    border-radius: 16px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

/* راست‌چین */
.rtl {
    direction: rtl;
    text-align: right;
}

/* === تیتر === */
.container h2 {
    text-align: center;
    color: #006d77;
    margin-bottom: 20px;
    font-size: 22px;
}

/* === فرم ورود و ثبت‌نام === */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.auth-form label {
    font-size: 14px;
    font-weight: bold;
    color: #005f73;
}

.auth-form input {
    padding: 12px;
    border: 1px solid #cfd8dc;
    border-radius: 10px;
    font-size: 14px;
    outline: none;
    transition: 0.3s;
}

.auth-form input:focus {
    border-color: #00b4d8;
    box-shadow: 0 0 6px rgba(0, 180, 216, 0.3);
}

/* دکمه‌ها */
.auth-form button {
    padding: 12px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, #00b4d8, #0096c7);
    color: white;
    font-size: 15px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
}

.auth-form button:hover {
    background: linear-gradient(135deg, #0096c7, #0077b6);
    transform: translateY(-2px);
}

/* پیام‌ها */
.error {
    background: #ffcccc;
    color: #b00020;
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 10px;
    font-size: 14px;
}

.success {
    background: #ccf2d6;
    color: #006d32;
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 10px;
    font-size: 14px;
}

.note {
    text-align: center;
    margin-top: 15px;
    font-size: 14px;
}

.note a {
    color: #0077b6;
    font-weight: bold;
    text-decoration: none;
}

.note a:hover {
    text-decoration: underline;
}

/* === واکنش‌گرایی === */
@media (max-width: 600px) {
    .container {
        margin: 20px;
        padding: 20px;
    }
}

ul.exam-results,
ul.exam-list {
    list-style-type: none; /* حذف نقطه‌ها */
    padding: 0;
    margin: 0;
}

ul.exam-results li,
ul.exam-list li {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

/* دکمه‌های عمومی */
.btn {
    display: inline-block;
    padding: 10px 20px;
    background: linear-gradient(135deg, #1e90ff, #00c6ff); /* آبی پزشکی */
    color: #fff;
    font-weight: bold;
    border: none;
    border-radius: 25px;
    text-decoration: none;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 3px 6px rgba(0,0,0,0.15);
    cursor: pointer;
}

.btn:hover {
    background: linear-gradient(135deg, #007acc, #00a3cc); /* آبی تیره‌تر در هاور */
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.2);
}

/* کارت‌ها */
.card {
    background: #ffffff;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 4px 10px rgba(0, 150, 200, 0.1);
    border: 1px solid #e0f7fa;
    transition: all 0.3s ease;
    direction: rtl; /* چون سایت فارسی هست */
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 150, 200, 0.2);
}

/* عنوان کارت */
.card strong {
    font-size: 18px;
    color: #007acc;
    display: block;
    margin-bottom: 10px;
}

/* نوشته‌های داخل کارت */
.card p,
.card span {
    font-size: 14px;
    color: #333;
}

/* دکمه داخل کارت */
.card .btn {
    margin-top: 10px;
    display: inline-block;
}

/* ==== استایل سراسری ==== */

/* راست‌چین */
.rtl {
    direction: rtl;
    text-align: right;
}

/* کارت‌ها */
.card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    padding: 20px;
    margin: 10px 0;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.15);
}

/* دکمه‌ها */
.btn {
    display: inline-block;
    margin-top: 10px;
    padding: 8px 14px;
    background: #2d89ef;
    color: #fff !important;
    border-radius: 6px;
    text-decoration: none;
    transition: background 0.2s;
}
.btn:hover {
    background: #1b5fbf;
}

/* لیست‌ها بدون نقطه */
ul.exam-results, ul.exam-list {
    list-style-type: none;
    padding: 0;
    margin: 0;
}


.card {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.card h3 {
    margin-bottom: 15px;
    font-size: 18px;
    border-bottom: 2px solid #eee;
    padding-bottom: 8px;
}

form label {
    display: block;
    font-weight: bold;
    margin: 10px 0 5px;
}

form input, form select {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 12px;
}

form .note {
    font-size: 12px;
    color: #666;
    margin-top: -8px;
    margin-bottom: 10px;
}

form .btn {
    background: #007bff;
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: 0.2s ease;
}

form .btn:hover {
    background: #0056b3;
}

.exam-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.exam-table th, 
.exam-table td {
    padding: 10px 12px;
    text-align: center;
    border-bottom: 1px solid #eee;
}

.exam-table th {
    background: #f8f9fa;
    font-weight: bold;
}

.exam-table tr:hover {
    background: #f1faff;
    transition: 0.2s ease;
}

.exam-table td a {
    text-decoration: none;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 13px;
    margin: 0 2px;
}

.exam-table td a:hover {
    opacity: 0.8;
}

.exam-table td a.delete {
    background: #dc3545;
    color: #fff;
}

.exam-table td a.edit {
    background: #007bff;
    color: #fff;
}


/* پروفایل */
.profile-card {
    max-width: 600px;
    margin: 0 auto 30px;
    padding: 20px;
    background: #fff;
    border-radius: 15px;
    box-shadow: 0 3px 12px rgba(0,0,0,0.1);
}

.profile-image-section {
    text-align: center;
    margin-bottom: 15px;
}

.profile-img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #4CAF50;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    font-weight: bold;
    margin-bottom: 6px;
    color: #444;
}

.form-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
}

.btn-save {
    width: 100%;
    padding: 12px;
    background: #4CAF50;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s ease;
}

.btn-save:hover {
    background: #43a047;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    padding: 10px;
    border-radius: 8px;
    text-align: center;
    margin-bottom: 15px;
}

/* ===== Header & Navbar ===== */
.navbar {
  width: 100%;
  background: var(--primary);
  color: #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.navbar-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 40px;
}

.navbar-logo {
  display: flex;
  align-items: center;
  cursor: pointer;
}

.logo-img {
  width: 42px;
  height: 42px;
  margin-left: 10px;
  border-radius: 50%;
}

.logo-text {
  font-size: 20px;
  font-weight: bold;
  color: #fff;
}

.navbar-menu ul {
  list-style: none;
  display: flex;
  gap: 25px;
  margin: 0;
  padding: 0;
}

.navbar-menu a {
  color: #fff;
  text-decoration: none;
  font-weight: 500;
  transition: 0.3s;
}
.navbar-menu a:hover {
  color: #e3f7f6;
}

.navbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-name {
  background: rgba(255,255,255,0.15);
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 14px;
}

/* دکمه‌ها هماهنگ با استایل کلی */
.btn {
  border: none;
  border-radius: 8px;
  padding: 8px 16px;
  cursor: pointer;
  font-family: inherit;
  font-size: 14px;
  transition: 0.3s;
}

.btn-login {
  background: var(--secondary);
  color: #fff;
}

.btn-logout {
  background: #e74c3c;
  color: #fff;
}

.btn:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

/* ریسپانسیو */
@media (max-width: 768px) {
  .navbar-container {
    flex-direction: column;
    gap: 10px;
  }
  .navbar-menu ul {
    flex-direction: column;
    align-items: center;
    gap: 10px;
  }
}

/* 🎨 استایل هدر جدید */
.modern-header {
  background: #fff;
  box-shadow: 0 3px 15px rgba(0,0,0,0.08);
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: all 0.3s ease;
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 12px 25px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 10px;
}

.site-logo {
  width: 55px;
  height: 55px;
  border-radius: 50%;
}

.site-name {
  font-size: 1.4rem;
  color: #2c3e50;
  font-weight: 700;
}
.site-name span {
  color: var(--primary);
}

.nav-links ul {
  display: flex;
  gap: 30px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-links a {
  color: #2c3e50;
  font-weight: 600;
  text-decoration: none;
  position: relative;
  transition: color 0.3s ease;
}

.nav-links a:hover {
  color: var(--primary);
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  right: 0;
  width: 0%;
  height: 2px;
  background: var(--primary);
  transition: width 0.3s ease;
}
.nav-links a:hover::after {
  width: 100%;
}

.auth-buttons {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn {
  padding: 7px 15px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  transition: all 0.3s ease;
}

.login-btn {
  background: var(--secondary);
  color: #fff;
}
.signup-btn {
  background: var(--primary);
  color: #fff;
}
.logout-btn {
  background: #e74c3c;
  color: #fff;
}
.btn:hover {
  transform: translateY(-2px);
  opacity: 0.9;
}

/* 📱 واکنش‌گرایی */
.menu-toggle {
  display: none;
  flex-direction: column;
  cursor: pointer;
  gap: 4px;
}
.menu-toggle span {
  width: 25px;
  height: 3px;
  background: #2c3e50;
  border-radius: 2px;
  transition: all 0.3s;
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
    width: 100%;
    background: #fff;
    box-shadow: 0 3px 10px rgba(0,0,0,0.05);
    position: absolute;
    top: 70px;
    right: 0;
    text-align: center;
    border-radius: 0 0 10px 10px;
  }

  .nav-links ul {
    flex-direction: column;
    padding: 15px 0;
  }

  .menu-toggle {
    display: flex;
  }

  .nav-links.active {
    display: block;
    animation: fadeIn 0.3s ease;
  }
}

/* انیمیشن باز شدن */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* منوی پروفایل */
.profile-menu {
    position: relative;
}
.profile-menu ul.profile-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.15);
    list-style: none;
    padding: 10px 0;
    min-width: 180px;
    z-index: 100;
}
.profile-menu ul.profile-dropdown li {
    padding: 8px 16px;
}
.profile-menu ul.profile-dropdown li a {
    color: #007bff;
    text-decoration: none;
    display: block;
}
.profile-menu:hover ul.profile-dropdown {
    display: block;
}

/* fade in برای بخش داشبورد */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-in.active {
    opacity: 1;
    transform: translateY(0);
}

/* عکس پروفایل در هدر */
.header-avatar {
    width: 50px;      /* اندازه کوچک‌تر */
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid #007bff;
}

.btn {
    background: #007bff;
    color: #fff;
    padding: 8px 12px;
    border-radius: 8px;
    text-decoration: none;
}
.btn:hover {
    background: #0056b3;
}
.btn-disabled {
    background: #ccc;
    pointer-events: none;
    color: #666;
}
