/* ========================================
   RESPONSIVE STYLES
   ======================================== */

/* Tablet */
@media (max-width: 992px) {
  .hero {
    padding: 3rem 1.5rem;
  }
  
  .hero__title {
    font-size: 2rem;
  }
  
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Mobile */
@media (max-width: 768px) {
  /* Header */
  .site-header {
    padding: 0.75rem 0.875rem;
  }
  
  .brand__text small {
    display: none;
  }
  
  .brand__logo {
    width: 40px;
    height: auto;
  }
  
  .brand__text strong {
    font-size: 0.95rem;
  }
  
  .header-controls {
    gap: 8px;
  }
  
  .theme-toggle,
  .lang-toggle,
  .user-btn {
    width: 38px;
    height: 38px;
    border-radius: 10px;
  }
  
  /* Hero */
  .hero {
    padding: 2.5rem 1rem;
  }
  
  .hero__eyebrow {
    font-size: 0.8rem;
    padding: 0.4rem 0.8rem;
  }
  
  .hero__title {
    font-size: 1.6rem;
  }
  
  .hero__subtitle {
    font-size: 0.95rem;
  }
  
  /* Email Card */
  .email-card {
    padding: 1.5rem;
    border-radius: 20px;
  }
  
  .email-display {
    flex-direction: column;
  }
  
  .email-display input {
    font-size: 0.9rem;
    padding: 0.9rem 1rem;
  }
  
  .email-display .copy-btn,
  .email-display .refresh-btn {
    width: 100%;
    height: 45px;
  }
  
  .email-display {
    gap: 8px;
  }
  
  /* Inbox */
  .inbox-section {
    padding: 1.5rem 1rem;
  }
  
  .inbox-header {
    flex-direction: column;
    gap: 1rem;
    align-items: stretch;
  }
  
  .inbox-header h2 {
    font-size: 1.3rem;
  }
  
  .refresh-inbox-btn {
    justify-content: center;
  }
  
  .message-item {
    padding: 0.8rem 1rem;
  }
  
  .message-icon {
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }
  
  .message-subject {
    font-size: 0.9rem;
  }
  
  .message-from {
    font-size: 0.8rem;
  }
  
  /* Features */
  .features-section {
    padding: 3rem 1rem;
  }
  
  .section-title {
    font-size: 1.5rem;
    margin-bottom: 2rem;
  }
  
  .features-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .feature-card {
    padding: 1.5rem;
  }
  
  .feature-icon {
    width: 60px;
    height: 60px;
    margin-bottom: 1rem;
  }
  
  .feature-icon i {
    font-size: 1.5rem;
  }
  
  .feature-card h3 {
    font-size: 1.1rem;
  }
  
  /* Footer */
  .site-footer {
    padding: 1.5rem 1rem;
  }
  
  .footer-brand span {
    font-size: 1rem;
  }
  
  /* User Dropdown */
  .user-dropdown {
    right: 0;
    left: auto;
    min-width: 200px;
  }
  
  [dir="ltr"] .user-dropdown {
    right: auto;
    left: 0;
  }
}

/* Small Mobile */
@media (max-width: 480px) {
  .site-header {
    padding: 0.65rem 0.75rem;
  }
  
  .brand__logo {
    width: 35px;
    height: auto;
  }
  
  .brand__text strong {
    font-size: 0.85rem;
  }
  
  .hero__title {
    font-size: 1.4rem;
  }
  
  .hero__subtitle {
    font-size: 0.9rem;
  }
  
  .email-card {
    padding: 1.2rem;
  }
  
  .email-card__header {
    font-size: 0.9rem;
  }
  
  .email-display input {
    font-size: 0.8rem;
  }
  
  .email-timer {
    font-size: 0.85rem;
  }
  
  .email-note {
    font-size: 0.8rem;
  }
  
  .inbox-empty i {
    font-size: 3rem;
  }
  
  .inbox-empty p {
    font-size: 1rem;
  }
}

/* RTL Specific Fixes */
[dir="rtl"] .user-dropdown {
  right: 0;
  left: auto;
}

[dir="ltr"] .user-dropdown {
  right: auto;
  left: 0;
}

/* Dark Mode Specific */
[data-theme="dark"] .email-display input {
  background: rgba(255, 255, 255, 0.05);
}

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

.email-card,
.feature-card,
.message-item {
  animation: fadeIn 0.5s ease forwards;
}

.feature-card:nth-child(1) { animation-delay: 0.1s; }
.feature-card:nth-child(2) { animation-delay: 0.2s; }
.feature-card:nth-child(3) { animation-delay: 0.3s; }
.feature-card:nth-child(4) { animation-delay: 0.4s; }

/* Loading States */
.loading {
  position: relative;
  pointer-events: none;
}

.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid var(--color-border);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Scrollbar Styling */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--color-bg);
}

::-webkit-scrollbar-thumb {
  background: var(--color-border);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-primary);
}

/* Selection */
::selection {
  background: var(--color-primary);
  color: white;
}

/* Focus Styles */
button:focus,
input:focus,
a:focus {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

button:focus:not(:focus-visible),
input:focus:not(:focus-visible),
a:focus:not(:focus-visible) {
  outline: none;
}

/* Print Styles */
@media print {
  .site-header,
  .site-footer,
  .email-card,
  .features-section {
    display: none;
  }
  
  .inbox-section {
    padding: 0;
  }
}
