/**
 * Wala Klmah TV Display Styles
 *
 * Optimized for TV, tablet, and mobile viewing
 * RTL Arabic layout with Cairo font
 */

/* Reset and base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
  font-family: 'Cairo', sans-serif;
  direction: rtl;
  text-align: center;
}

body {
  background: radial-gradient(60% 50% at 50% 25%, #0f5a84 0%, rgba(10, 74, 110, 0.9) 35%, #073a55 70%, #052E43 100%);
  color: white;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 20px;
}

/* Container */
.container {
  width: 100%;
  max-width: 1200px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  min-height: 100vh;
  padding: 40px 20px;
}

/* Header */
header {
  margin-bottom: 40px;
}

.logo {
  width: 120px;
  height: 120px;
  border-radius: 24px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

/* Main content */
main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

/* Word card */
.word-card {
  background: white;
  border-radius: 30px;
  padding: 60px 80px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  max-width: 90%;
  width: 100%;
  animation: fadeIn 0.5s ease-out;
}

.word-hint {
  font-size: 1.5rem;
  color: #ff9800;
  margin-bottom: 30px;
  font-weight: 600;
}

.word-text {
  font-size: 5rem;
  font-weight: 800;
  color: #052E43;
  line-height: 1.3;
  word-wrap: break-word;
}

/* Error card */
.error-card {
  background: white;
  border-radius: 30px;
  padding: 60px 80px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  max-width: 600px;
  width: 100%;
  animation: fadeIn 0.5s ease-out;
}

.error-icon {
  font-size: 4rem;
  margin-bottom: 20px;
}

.error-title {
  font-size: 2rem;
  font-weight: 700;
  color: #d32f2f;
  margin-bottom: 20px;
}

.error-message {
  font-size: 1.3rem;
  color: #333;
  margin-bottom: 15px;
  line-height: 1.6;
}

.error-hint {
  font-size: 1.1rem;
  color: #666;
  font-weight: 500;
}

/* Footer */
footer {
  margin-top: 40px;
  opacity: 0.8;
}

.app-name {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 5px;
}

.app-tagline {
  font-size: 1rem;
  opacity: 0.7;
}

/* Expired overlay */
.expired-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(5, 46, 67, 0.95);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  font-size: 2rem;
  color: white;
  z-index: 9999;
}

.expired-overlay p {
  margin: 10px 0;
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive styles */

/* Large TVs */
@media (min-width: 1400px) {
  .word-text {
    font-size: 7rem;
  }

  .word-hint {
    font-size: 2rem;
  }

  .logo {
    width: 150px;
    height: 150px;
  }

  .word-card {
    padding: 80px 120px;
  }
}

/* Tablets */
@media (max-width: 1024px) {
  .word-text {
    font-size: 4rem;
  }

  .word-card {
    padding: 50px 60px;
  }

  .error-card {
    padding: 40px 50px;
  }
}

/* Mobile */
@media (max-width: 768px) {
  .container {
    padding: 20px 10px;
  }

  .logo {
    width: 80px;
    height: 80px;
    border-radius: 16px;
  }

  .word-card {
    padding: 40px 30px;
    border-radius: 20px;
  }

  .word-hint {
    font-size: 1.2rem;
    margin-bottom: 20px;
  }

  .word-text {
    font-size: 2.5rem;
  }

  .error-card {
    padding: 30px 25px;
    border-radius: 20px;
  }

  .error-icon {
    font-size: 3rem;
  }

  .error-title {
    font-size: 1.5rem;
  }

  .error-message {
    font-size: 1.1rem;
  }

  .error-hint {
    font-size: 1rem;
  }

  .app-name {
    font-size: 1.2rem;
  }

  .app-tagline {
    font-size: 0.9rem;
  }
}

/* Small mobile */
@media (max-width: 480px) {
  .word-text {
    font-size: 2rem;
  }

  .word-card {
    padding: 30px 20px;
  }
}

/* Landscape mode on mobile */
@media (max-height: 500px) and (orientation: landscape) {
  .container {
    padding: 10px;
    min-height: auto;
  }

  header {
    margin-bottom: 10px;
  }

  .logo {
    width: 60px;
    height: 60px;
  }

  .word-card {
    padding: 20px 40px;
  }

  .word-hint {
    font-size: 1rem;
    margin-bottom: 10px;
  }

  .word-text {
    font-size: 2.5rem;
  }

  footer {
    margin-top: 10px;
  }

  .app-name {
    font-size: 1rem;
  }

  .app-tagline {
    display: none;
  }
}

/* ==================== */
/* Home Page Styles     */
/* ==================== */

.home-page {
  background: radial-gradient(60% 50% at 50% 25%, #0f5a84 0%, rgba(10, 74, 110, 0.9) 35%, #073a55 70%, #052E43 100%);
}

.word-page {
  /* تركيز الإضاءة حول بطاقة الكلمة في منتصف/أسفل الشاشة */
  background: radial-gradient(55% 45% at 50% 60%, #0f5a84 0%, rgba(10, 74, 110, 0.9) 35%, #073a55 70%, #052E43 100%);
}

.home-container {
  justify-content: center;
  min-height: 100vh;
  padding: 40px 20px;
}

.home-content {
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.home-header {
  margin-bottom: 60px;
  animation: fadeIn 0.6s ease-out;
}

.home-logo {
  width: 150px;
  height: 150px;
  border-radius: 32px;
  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.4);
  margin-bottom: 30px;
}

.home-title {
  font-size: 3rem;
  font-weight: 800;
  color: white;
  margin-bottom: 15px;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.home-tagline {
  font-size: 1.3rem;
  color: rgba(255, 255, 255, 0.8);
  font-weight: 500;
}

/* Download Buttons */
.download-buttons {
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: center;
  animation: fadeIn 0.8s ease-out 0.2s both;
}

.store-button {
  display: block;
  line-height: 0;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.store-button:hover {
  transform: translateY(-5px) scale(1.05);
}

.store-button:active {
  transform: translateY(-2px) scale(1.02);
}

.store-button img {
  width: 240px;
  height: 76px;
  object-fit: contain;
  display: block;
  border-radius: 12px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.35);
}

.home-footer {
  margin-top: 60px;
  opacity: 0.6;
  font-size: 0.9rem;
}

/* Home Page Responsive */
@media (min-width: 600px) {
  .download-buttons {
    flex-direction: row;
    gap: 30px;
  }

  .store-button img {
    width: 280px;
    height: 88px;
  }
}

@media (max-width: 480px) {
  .home-logo {
    width: 120px;
    height: 120px;
    border-radius: 24px;
  }

  .home-title {
    font-size: 2.2rem;
  }

  .home-tagline {
    font-size: 1.1rem;
  }

  .store-button img {
    width: 200px;
    height: 64px;
  }

  .home-header {
    margin-bottom: 40px;
  }
}
