:root {
  /* Palette */
  --color-navy: #0a192f;
  --color-green: #00ffa3;
  --color-green-dim: rgba(0, 255, 163, 0.1);
  --color-white-tint: #e6f1ff; /* Navy tinted white for dark mode text */

  /* Default Theme (Dark) */
  --bg-color: var(--color-navy);
  --text-color: var(--color-white-tint);
  --accent-color: var(--color-green);
  --card-bg: #112240; /* Slightly lighter navy for card */
  --border-color: var(--color-green);
  --header-bg: rgba(10, 25, 47, 0.95);
  --footer-bg: #020c1b; /* Darker navy */

  --shadow: 0 10px 30px -10px rgba(2, 12, 27, 0.7);
  --transition: all 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
  --font-main: "Inter", sans-serif;
  --font-arabic: "Cairo", sans-serif;
}

[data-theme="light"] {
  /* Light Theme - Harmonious Blend */
  --bg-color: #f0fdf4; /* Very light green tint */
  --text-color: var(--color-navy);
  --accent-color: #00cc82; /* Darker green for better contrast on light bg */
  --card-bg: #ffffff;
  --border-color: var(--color-navy);
  --header-bg: rgba(255, 255, 255, 0.95);
  --footer-bg: #e6f1ff;

  --shadow: 0 10px 30px -10px rgba(10, 25, 47, 0.1);
}

/* System Preference: Light */
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg-color: #f0fdf4;
    --text-color: var(--color-navy);
    --accent-color: #00cc82;
    --card-bg: #ffffff;
    --border-color: var(--color-navy);
    --header-bg: rgba(255, 255, 255, 0.95);
    --footer-bg: #e6f1ff;
    --shadow: 0 10px 30px -10px rgba(10, 25, 47, 0.1);
  }
}

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

body {
  font-family: var(--font-main);
  background-color: var(--bg-color);
  color: var(--text-color);
  line-height: 1.6;
  transition: var(--transition);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Container */
.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

/* Header */
.site-header {
  background-color: var(--header-bg);
  padding: 1rem 0;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(10px);
  transition: var(--transition);
  border-bottom: 1px solid rgba(0, 255, 163, 0.1);
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-logo {
  height: 50px;
  width: auto;
  margin-right: 15px;
}

.header-text h1 {
  font-size: 1.5rem;
  color: var(--accent-color);
  margin-bottom: 0.2rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

[data-theme="light"] .header-text h1 {
  color: var(--color-navy);
}

.header-text p {
  font-size: 0.9rem;
  opacity: 0.8;
  color: var(--text-color);
}

.theme-selector {
  position: relative;
}

#theme-select {
  appearance: none;
  background-color: transparent;
  border: 2px solid var(--accent-color);
  color: var(--accent-color);
  padding: 0.5rem 2rem 0.5rem 1rem;
  border-radius: 50px;
  cursor: pointer;
  font-size: 0.9rem;
  font-family: var(--font-main);
  font-weight: 600;
  outline: none;
  transition: var(--transition);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2300ffa3' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
}

#theme-select:hover,
#theme-select:focus {
  background-color: rgba(0, 255, 163, 0.1);
}

#theme-select option {
  background-color: var(--header-bg);
  color: var(--text-color);
  padding: 10px;
}

/* Adjust icon color for light mode */
[data-theme="light"] #theme-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2300cc82' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) #theme-select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2300cc82' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  }
}

/* Main Content */
main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4rem 0;
}

.main-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

/* Quote Card */
.quote-card {
  background-color: var(--card-bg);
  padding: 4rem 3rem;
  border-radius: 20px;
  box-shadow: var(--shadow);
  text-align: center;
  max-width: 800px;
  width: 100%;
  margin-bottom: 3rem;
  position: relative;
  transition: var(--transition);
  min-height: 250px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  border: 1px solid rgba(0, 255, 163, 0.1);
}

[data-theme="light"] .quote-card {
  border: 1px solid rgba(10, 25, 47, 0.1);
}

.quote-icon {
  font-size: 2.5rem;
  color: var(--accent-color);
  opacity: 0.3;
  position: absolute;
}

.quote-icon:first-child {
  top: 25px;
  left: 25px;
}

.quote-icon.right {
  bottom: 25px;
  right: 25px;
}

.quote-text {
  font-size: 1.8rem;
  font-weight: 600;
  margin: 1.5rem 0;
  color: var(--text-color);
  opacity: 0;
  animation: fadeIn 0.5s forwards;
  line-height: 1.6;
}

.quote-text.arabic {
  font-family: var(--font-arabic);
  direction: rtl;
  line-height: 1.8;
  font-weight: 700;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Buttons */
.button-group {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  justify-content: center;
  width: 100%;
}

.btn {
  padding: 1rem 2rem;
  border: 2px solid var(--accent-color);
  border-radius: 50px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 0.8rem;
  font-family: var(--font-main);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background-color: transparent;
  color: var(--accent-color);
}

.btn:hover {
  background-color: var(--accent-color);
  color: var(--color-navy); /* Always navy text on hover for contrast */
  transform: translateY(-4px);
  box-shadow: 0 10px 20px -10px rgba(0, 255, 163, 0.4);
}

[data-theme="light"] .btn {
  border-color: var(--color-navy);
  color: var(--color-navy);
}

[data-theme="light"] .btn:hover {
  background-color: var(--color-navy);
  color: var(--color-green);
  box-shadow: 0 10px 20px -10px rgba(10, 25, 47, 0.4);
}

/* Footer */
.site-footer {
  background-color: var(--footer-bg);
  padding: 4rem 0 1.5rem;
  margin-top: auto;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

[data-theme="light"] .site-footer {
  border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-column h4 {
  color: var(--accent-color);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

[data-theme="light"] .footer-column h4 {
  color: var(--color-navy);
}

.footer-column p {
  font-size: 0.95rem;
  opacity: 0.8;
  color: var(--text-color);
}

.contact-list {
  list-style: none;
}

.contact-list li {
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.contact-list a {
  color: var(--text-color);
  text-decoration: none;
  transition: var(--transition);
  opacity: 0.8;
  font-weight: 500;
}

.contact-list a:hover {
  color: var(--accent-color);
  opacity: 1;
  transform: translateX(5px);
  display: inline-block;
}

[data-theme="light"] .contact-list a:hover {
  color: var(--color-navy);
}

.social-icons {
  display: flex;
  gap: 1.5rem;
}

.social-icons a {
  color: var(--text-color);
  font-size: 1.4rem;
  transition: var(--transition);
  opacity: 0.8;
  display: flex;
  align-items: center;
  gap: 0.2rem;
  text-decoration: none;
}

.social-icons a:hover {
  color: var(--accent-color);
  transform: translateY(-3px);
  opacity: 1;
}

[data-theme="light"] .social-icons a:hover {
  color: var(--color-navy);
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.85rem;
  opacity: 0.6;
  color: var(--text-color);
}

[data-theme="light"] .footer-bottom {
  border-top: 1px solid rgba(0, 0, 0, 0.05);
}

/* Responsive */
@media (max-width: 768px) {
  main {
    padding: 2rem 0;
  }

  .header-text h1 {
    font-size: 1.2rem;
  }

  .quote-card {
    padding: 2.5rem 1.5rem;
    margin-bottom: 2rem;
  }

  .quote-text {
    font-size: 1.4rem;
  }

  .button-group {
    flex-direction: column;
    width: 100%;
    gap: 1rem;
  }

  .btn {
    width: 100%;
    justify-content: center;
  }
}
