:root {
  --primary-color: #ffd700; /* Gold */
  --primary-hover: #d4af37; /* Darker Gold */
  --secondary-color: #000000; /* Black */
  --bg-color: #1a1a1a; /* Light Black for backgrounds */
  --text-color: #ffffff; /* White */
  --accent-color: #ffa500; /* Orange */
  --success-color: #4caf50;
  --error-color: #f44336;
  --font-heading: "Cairo", "Tajawal", sans-serif;
  --font-body: "Tajawal", sans-serif;
}

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

body {
  font-family: var(--font-body);
  background-color: var(--secondary-color);
  color: var(--text-color);
  line-height: 1.6;
  direction: rtl; /* Arabic Interface */
  overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  margin-bottom: 1rem;
}

a {
  text-decoration: none;
  color: inherit;
  transition: 0.3s;
}

ul {
  list-style: none;
}

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

/* Helper Classes */
.text-primary {
  color: var(--primary-color);
}
.text-center {
  text-align: center;
}
.btn {
  display: inline-block;
  padding: 12px 30px;
  border-radius: 50px;
  font-weight: bold;
  cursor: pointer;
  border: none;
  outline: none;
  font-size: 1.1rem;
  transition: all 0.3s ease;
}

.btn-primary {
  background-color: var(--primary-color);
  color: var(--secondary-color);
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(255, 215, 0, 0.3);
}

.btn-outline {
  border: 2px solid var(--primary-color);
  color: var(--primary-color);
  background: transparent;
}

.btn-outline:hover {
  background-color: var(--primary-color);
  color: var(--secondary-color);
}

/* Header */
header {
  padding: 20px 0;
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
  background-color: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(10px);
}

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

.logo {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--primary-color);
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-links {
  display: flex;
  gap: 20px;
}

.nav-links a:hover {
  color: var(--primary-color);
}

/* Hero Section */
.hero {
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: radial-gradient(circle at center, #2a2a2a 0%, #000000 100%);
  padding-top: 80px;
}

.hero-content h1 {
  font-size: 3.5rem;
  margin-bottom: 20px;
  line-height: 1.2;
}

.hero-content p {
  font-size: 1.2rem;
  margin-bottom: 30px;
  color: #cccccc;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* Features */
.features {
  padding: 100px 0;
  background-color: var(--bg-color);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 50px;
}

.feature-card {
  background: #000000;
  padding: 30px;
  border-radius: 20px;
  border: 1px solid #333;
  transition: 0.3s;
  text-align: center;
}

.feature-card:hover {
  border-color: var(--primary-color);
  transform: translateY(-10px);
}

.feature-icon {
  font-size: 2.5rem;
  color: var(--primary-color);
  margin-bottom: 20px;
}

/* CTA Section */
.cta {
  padding: 100px 0;
  text-align: center;
  background: linear-gradient(45deg, #000000, #1a1a1a);
}

/* Footer */
footer {
  padding: 20px 0;
  text-align: center;
  border-top: 1px solid #333;
  color: #777;
  margin-top: auto;
}

/* App Interface Specifics */
.app-container {
  padding-top: 120px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.recorder-wrapper {
  text-align: center;
  margin-bottom: 50px;
  position: relative;
}

.mic-btn {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: var(--bg-color);
  border: 2px solid var(--primary-color);
  color: var(--primary-color);
  font-size: 3rem;
  cursor: pointer;
  transition: 0.3s;
  outline: none;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

.mic-btn.recording {
  background: var(--primary-color);
  color: #000;
  box-shadow: 0 0 30px rgba(255, 215, 0, 0.5);
}

.mic-btn:hover {
  transform: scale(1.05);
}

.status-text {
  margin-top: 20px;
  font-size: 1.2rem;
  color: #888;
  height: 30px; /* Preserve space */
}

.result-area {
  width: 100%;
  max-width: 800px;
  background: var(--bg-color);
  border-radius: 15px;
  padding: 30px;
  min-height: 200px;
  position: relative;
  border: 1px solid #333;
}

.result-text {
  font-size: 1.1rem;
  white-space: pre-wrap;
  line-height: 1.8;
}

.copy-btn {
  position: absolute;
  top: 20px;
  left: 20px; /* Arabic RTL */
  background: transparent;
  border: 1px solid #555;
  color: #aaa;
  padding: 5px 15px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: 0.2s;
}

.copy-btn:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
}

/* Loader */
.loader {
  display: none;
  width: 48px;
  height: 48px;
  border: 5px solid #fff;
  border-bottom-color: var(--primary-color);
  border-radius: 50%;
  animation: rotation 1s linear infinite;
  margin: 20px auto;
}

@keyframes rotation {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

@media (max-width: 768px) {
  .hero-content h1 {
    font-size: 2.5rem;
  }
}
