/* Orynx AI Labs - Nano Banana Generator */
/* Color palette inspired by the Orynx logo */
:root {
  --orynx-primary: #00d4ff;
  --orynx-secondary: #0099cc;
  --orynx-dark: #1a2332;
  --orynx-darker: #0f1419;
  --orynx-light: #e6f7ff;
  --orynx-gradient: linear-gradient(135deg, #00d4ff 0%, #0099cc 100%);
  --orynx-shadow: 0 4px 20px rgba(0, 212, 255, 0.3);
}

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

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: var(--orynx-darker);
  color: white;
  line-height: 1.6;
  min-height: 100vh;
}

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

/* Header */
.header {
  background: var(--orynx-dark);
  padding: 1rem 0;
  border-bottom: 2px solid var(--orynx-primary);
  position: sticky;
  top: 0;
  z-index: 100;
}

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

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.logo-section {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.logo {
  width: 50px;
  height: 50px;
  transition: transform 0.3s ease;
}

.logo:hover {
  transform: scale(1.1) rotate(5deg);
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-size: 1.8rem;
  font-weight: bold;
  color: var(--orynx-primary);
  text-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
}

.brand-subtitle {
  font-size: 0.9rem;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Main Content */
.main-content {
  padding: 2rem 0;
}

.hero-section {
  text-align: center;
  margin-bottom: 3rem;
  padding: 3rem 0;
  background: linear-gradient(135deg, rgba(0, 212, 255, 0.1) 0%, rgba(0, 153, 204, 0.1) 100%);
  border-radius: 20px;
  border: 1px solid rgba(0, 212, 255, 0.2);
}

.hero-title {
  font-size: 3rem;
  font-weight: bold;
  background: var(--orynx-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 1rem;
}

.hero-description {
  font-size: 1.2rem;
  color: #ccc;
  max-width: 600px;
  margin: 0 auto;
}

/* Generation Form */
.generation-section {
  background: var(--orynx-dark);
  padding: 2rem;
  border-radius: 15px;
  margin-bottom: 2rem;
  border: 1px solid rgba(0, 212, 255, 0.2);
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--orynx-primary);
}

.form-input {
  width: 100%;
  padding: 0.75rem;
  background: var(--orynx-darker);
  border: 2px solid rgba(0, 212, 255, 0.3);
  border-radius: 8px;
  color: white;
  font-size: 1rem;
  transition: all 0.3s ease;
}

.form-input:focus {
  outline: none;
  border-color: var(--orynx-primary);
  box-shadow: var(--orynx-shadow);
}

.form-textarea {
  min-height: 120px;
  resize: vertical;
}

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='%2300d4ff' viewBox='0 0 16 16'%3e%3cpath d='m7.247 4.86-4.796 5.481c-.566.647-.106 1.659.753 1.659h9.592a1 1 0 0 0 .753-1.659l-4.796-5.48a1 1 0 0 0-1.506 0z'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 16px 12px;
  padding-right: 2.5rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

/* Buttons */
.btn {
  padding: 0.75rem 2rem;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-block;
  text-align: center;
}

.btn-primary {
  background: var(--orynx-gradient);
  color: white;
  box-shadow: var(--orynx-shadow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(0, 212, 255, 0.4);
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

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

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

/* Loading Animation */
.loading-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top: 2px solid white;
  animation: spin 1s linear infinite;
  margin-right: 0.5rem;
}

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

/* Results Section */
.results-section {
  margin-top: 2rem;
}

.image-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.image-card {
  background: var(--orynx-dark);
  border-radius: 15px;
  overflow: hidden;
  border: 1px solid rgba(0, 212, 255, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.image-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--orynx-shadow);
}

.generated-image {
  width: 100%;
  height: 300px;
  object-fit: cover;
}

.image-info {
  padding: 1rem;
}

.image-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
}

/* Status Messages */
.status-message {
  padding: 1rem;
  border-radius: 8px;
  margin: 1rem 0;
  border-left: 4px solid;
}

.status-success {
  background: rgba(0, 255, 0, 0.1);
  border-color: #00ff00;
  color: #00ff88;
}

.status-error {
  background: rgba(255, 0, 0, 0.1);
  border-color: #ff0000;
  color: #ff6666;
}

.status-info {
  background: rgba(0, 212, 255, 0.1);
  border-color: var(--orynx-primary);
  color: var(--orynx-primary);
}

/* Footer */
.footer {
  background: var(--orynx-dark);
  padding: 2rem 0;
  text-align: center;
  border-top: 1px solid rgba(0, 212, 255, 0.2);
  margin-top: 4rem;
}

.footer-text {
  color: #888;
  margin-bottom: 0.5rem;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 2rem;
}

.footer-link {
  color: var(--orynx-primary);
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-link:hover {
  color: white;
}

/* Language Toggle */
.language-toggle {
  margin-left: 1rem;
}

.btn-language {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: transparent;
  border: 2px solid var(--orynx-primary);
  border-radius: 25px;
  color: var(--orynx-primary);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.9rem;
}

.btn-language:hover {
  background: var(--orynx-primary);
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(0, 212, 255, 0.3);
}

.flag-icon {
  font-size: 1.2rem;
  line-height: 1;
}

.lang-text {
  font-weight: bold;
  font-size: 0.85rem;
}

/* RTL (Right-to-Left) Support */
[dir="rtl"] {
  direction: rtl;
  text-align: right;
}

[dir="rtl"] .header-content {
  flex-direction: row-reverse;
}

[dir="rtl"] .logo-section {
  flex-direction: row-reverse;
}

[dir="rtl"] .nav-links {
  flex-direction: row-reverse;
}

[dir="rtl"] .language-toggle {
  margin-left: 0;
  margin-right: 1rem;
}

[dir="rtl"] .form-row {
  direction: rtl;
}

[dir="rtl"] .form-input,
[dir="rtl"] .form-textarea {
  text-align: right;
}

[dir="rtl"] .form-select {
  background-position: left 0.75rem center;
  padding-right: 0.75rem;
  padding-left: 2.5rem;
}

[dir="rtl"] .image-actions {
  flex-direction: row-reverse;
}

[dir="rtl"] .footer-links {
  flex-direction: row-reverse;
}

[dir="rtl"] .btn-language {
  flex-direction: row-reverse;
}

[dir="rtl"] .hero-section,
[dir="rtl"] .generation-section,
[dir="rtl"] .results-section {
  text-align: right;
}

[dir="rtl"] .text-center {
  text-align: center !important;
}

/* Arabic Font Support */
[lang="ar"] {
  font-family: 'Cairo', 'Amiri', 'Noto Sans Arabic', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

[lang="ar"] .brand-title {
  font-family: 'Cairo', 'Amiri', 'Noto Sans Arabic', sans-serif;
  font-weight: 700;
}

[lang="ar"] .hero-title {
  font-family: 'Cairo', 'Amiri', 'Noto Sans Arabic', sans-serif;
  font-weight: 700;
}

/* Loading Animation for Language Switching */
.language-switching {
  opacity: 0.7;
  transition: opacity 0.3s ease;
}

.language-switching * {
  pointer-events: none;
}

/* Responsive Design */
@media (max-width: 768px) {
  .hero-title {
    font-size: 2rem;
  }
  
  .form-row {
    grid-template-columns: 1fr;
  }
  
  .header-content {
    flex-direction: column;
    gap: 1rem;
  }
  
  .footer-links {
    flex-direction: column;
    gap: 1rem;
  }
}

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

.fade-in-up {
  animation: fadeInUp 0.6s ease-out;
}

/* Utility Classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.hidden { display: none; }
.block { display: block; }
.flex { display: flex; }
.grid { display: grid; }

.w-full { width: 100%; }
.h-full { height: 100%; }