/* EzzySMP Website - Responsive Styles */

/* ===== Tablet (max-width: 992px) ===== */
@media (max-width: 992px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.75rem; }

  .hero h1 {
    font-size: 2.5rem;
  }

  .hero .tagline {
    font-size: 1.25rem;
  }

  .section {
    padding: 60px 0;
  }

  .page-header {
    padding: 120px 0 60px;
  }

  .page-header h1 {
    font-size: 2.5rem;
  }

  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ===== Mobile (max-width: 768px) ===== */
@media (max-width: 768px) {
  /* Navigation */
  .navbar .container {
    position: relative;
  }

  .mobile-toggle {
    display: flex;
    z-index: 1001;
  }

  .navbar-nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 300px;
    height: 100vh;
    flex-direction: column;
    background: var(--bg-secondary);
    padding: 80px 30px 30px;
    gap: 0;
    transition: var(--transition);
    border-left: 1px solid var(--border-color);
    overflow-y: auto;
  }

  .navbar-nav.active {
    right: 0;
  }

  .navbar-nav li {
    width: 100%;
  }

  .navbar-nav a {
    display: block;
    padding: 15px 0;
    border-bottom: 1px solid var(--border-color);
  }

  .navbar-nav a::after {
    display: none;
  }

  /* Mobile toggle animation */
  .mobile-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }

  .mobile-toggle.active span:nth-child(2) {
    opacity: 0;
  }

  .mobile-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
  }

  /* Hero */
  .hero {
    min-height: auto;
    padding: 120px 20px 60px;
  }

  .hero h1 {
    font-size: 2rem;
  }

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

  .hero-logo {
    width: 100px;
    height: 100px;
  }

  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }

  .hero-buttons .btn {
    width: 100%;
    max-width: 280px;
  }

  /* Typography */
  h1 { font-size: 1.75rem; }
  h2 { font-size: 1.5rem; }
  h3 { font-size: 1.25rem; }

  .section-title h2 {
    font-size: 1.75rem;
  }

  .page-header {
    padding: 100px 0 40px;
  }

  .page-header h1 {
    font-size: 2rem;
  }

  /* Grids */
  .features-grid,
  .stats-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  /* Stats */
  .stat-number {
    font-size: 2.5rem;
  }

  /* Content */
  .content-card {
    padding: 25px;
  }

  /* Copy Box */
  .copy-box {
    flex-direction: column;
    text-align: center;
  }

  .copy-box .btn {
    width: 100%;
  }

  /* Steps */
  .step {
    flex-direction: column;
    text-align: center;
  }

  .step-number {
    margin: 0 auto;
  }

  /* Tables */
  th, td {
    padding: 12px 15px;
  }

  /* Modal */
  .modal {
    width: 95%;
    margin: 20px;
  }

  /* Buttons */
  .btn {
    padding: 10px 20px;
  }

  .btn-lg {
    padding: 14px 28px;
  }

  /* Forms */
  .form-input,
  .form-textarea,
  .form-select {
    padding: 10px 14px;
  }

  /* Tabs */
  .tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .tabs::-webkit-scrollbar {
    display: none;
  }

  .tab {
    padding: 10px 16px;
    font-size: 0.9rem;
  }

  /* Cards */
  .card-body {
    padding: 15px;
  }

  /* User Card */
  .user-card {
    flex-direction: column;
    text-align: center;
  }

  /* Post Preview */
  .post-preview-meta {
    flex-wrap: wrap;
    gap: 10px;
  }

  /* Leaderboard */
  .leaderboard-entry {
    flex-wrap: wrap;
    gap: 10px;
  }

  .leaderboard-player {
    order: -1;
    width: 100%;
  }

  .leaderboard-rank {
    width: auto;
    height: auto;
  }

  /* Toast */
  .toast-container {
    left: 20px;
    right: 20px;
    bottom: 20px;
  }

  .toast {
    max-width: 100%;
  }

  /* Section spacing */
  .section {
    padding: 40px 0;
  }

  /* Container padding */
  .container {
    padding: 0 15px;
  }
}

/* ===== Small Mobile (max-width: 480px) ===== */
@media (max-width: 480px) {
  .hero h1 {
    font-size: 1.75rem;
  }

  .hero .tagline {
    font-size: 1rem;
  }

  .hero-logo {
    width: 80px;
    height: 80px;
  }

  .page-header h1 {
    font-size: 1.75rem;
  }

  .section-title h2 {
    font-size: 1.5rem;
  }

  .stat-number {
    font-size: 2rem;
  }

  .btn {
    font-size: 0.9rem;
    padding: 10px 16px;
  }

  .feature-card {
    padding: 20px;
  }

  .feature-icon {
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
  }

  .content-card {
    padding: 20px;
  }

  .modal-header,
  .modal-body,
  .modal-footer {
    padding: 15px;
  }

  .pagination-btn {
    min-width: 35px;
    height: 35px;
  }

  /* Hide non-essential items on very small screens */
  .footer-section:nth-child(3),
  .footer-section:nth-child(4) {
    display: none;
  }
}

/* ===== Landscape orientation adjustments ===== */
@media (max-height: 500px) and (orientation: landscape) {
  .hero {
    min-height: auto;
    padding: 100px 20px 40px;
  }

  .hero-logo {
    width: 60px;
    height: 60px;
    margin-bottom: 15px;
  }

  .hero h1 {
    font-size: 1.5rem;
    margin-bottom: 10px;
  }

  .hero .tagline {
    font-size: 0.9rem;
    margin-bottom: 20px;
  }

  .hero-buttons {
    flex-direction: row;
  }
}

/* ===== Print styles ===== */
@media print {
  .navbar,
  .footer,
  .btn,
  .mobile-toggle {
    display: none !important;
  }

  body {
    background: white;
    color: black;
  }

  .hero,
  .page-header {
    padding: 20px 0;
    background: none;
  }

  a {
    color: black;
    text-decoration: underline;
  }

  .card,
  .content-card {
    border: 1px solid #ccc;
    background: white;
  }
}

/* ===== Reduced motion ===== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }
}

/* ===== High contrast mode ===== */
@media (prefers-contrast: high) {
  :root {
    --border-color: #666666;
    --text-secondary: #aaaaaa;
    --text-muted: #888888;
  }

  .btn-primary,
  .btn-discord {
    border: 2px solid white;
  }

  .card,
  .content-card {
    border-width: 2px;
  }
}
