/* ============================================
   CRAZY TIME - RESPONSIVE CSS
   Media queries for mobile, tablet, desktop
   ============================================ */

/* ========== TABLET (max-width: 1024px) ========== */
@media (max-width: 1024px) {
  /* Typography */
  html {
    font-size: 15px;
  }
  
  h1 {
    font-size: 2.5rem;
  }
  
  h2 {
    font-size: 2rem;
  }
  
  /* Layout */
  .block {
    padding: calc(var(--spacing-3xl) * 0.8) 0;
  }
  
  .block-title {
    font-size: 2rem;
  }
  
  /* Grid */
  .col-3 {
    flex: 0 0 50%;
  }
  
  .col-4 {
    flex: 0 0 50%;
  }
  
  .grid-4 {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  }
  
  /* Header */
  .nav {
    gap: var(--spacing-md);
  }
  
  .nav-link {
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
  }
  
  /* Hero */
  .hero {
    padding: calc(var(--spacing-3xl) * 0.8) 0;
  }
  
  .hero-description {
    font-size: 1.125rem;
  }
  
  /* Footer */
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ========== MOBILE (max-width: 768px) ========== */
@media (max-width: 768px) {
  /* Typography */
  html {
    font-size: 14px;
  }
  
  h1 {
    font-size: 2rem;
  }
  
  h2 {
    font-size: 1.75rem;
  }
  
  h3 {
    font-size: 1.5rem;
  }
  
  /* Layout */
  .block {
    padding: var(--spacing-xl) 0;
  }
  
  .block-title {
    font-size: 1.75rem;
    margin-bottom: var(--spacing-lg);
  }
  
  .block-subtitle {
    font-size: 1rem;
  }
  
  /* Container */
  :root {
    --container-padding: 15px;
  }
  
  /* Grid */
  .row {
    flex-direction: column;
  }
  
  .col,
  .col-2,
  .col-3,
  .col-4 {
    flex: 0 0 100%;
    margin-bottom: var(--spacing-md);
  }
  
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }
  
  /* Header */
  .header-container {
    flex-direction: column;
    gap: var(--spacing-md);
  }
  
  .logo {
    font-size: 1.5rem;
  }
  
  .nav {
    display: none;
    flex-direction: column;
    width: 100%;
    gap: 0;
  }
  
  .nav.mobile-open {
    display: flex;
  }
  
  .nav-link {
    width: 100%;
    text-align: center;
    padding: var(--spacing-md);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }
  
  .mobile-menu-toggle {
    display: block;
    position: absolute;
    top: var(--spacing-md);
    right: var(--container-padding);
  }
  
  /* Page Navigation */
  .page-nav {
    padding: var(--spacing-sm) 0;
    top: auto;
    position: relative;
  }
  
  .page-nav-list {
    gap: var(--spacing-sm);
    padding: 0 var(--spacing-xs);
  }
  
  .page-nav-link {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
  }
  
  /* Hero */
  .hero {
    padding: var(--spacing-xl) 0;
  }
  
  .hero-content {
    padding: 0 var(--spacing-sm);
  }
  
  .hero h1 {
    font-size: 2rem;
    margin-bottom: var(--spacing-md);
  }
  
  .hero-description {
    font-size: 1rem;
    margin-bottom: var(--spacing-lg);
  }
  
  .hero-rating {
    flex-direction: column;
    gap: var(--spacing-xs);
  }
  
  .stars {
    font-size: 1.25rem;
  }
  
  .rating-text {
    font-size: 1rem;
  }
  
  .hero-cta {
    flex-direction: column;
    gap: var(--spacing-sm);
  }
  
  .hero-cta .btn {
    width: 100%;
  }
  
  /* Buttons */
  .btn {
    padding: 0.75rem 1.5rem;
    font-size: 0.9375rem;
  }
  
  .btn-large {
    padding: 1rem 2rem;
    font-size: 1rem;
  }
  
  .btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.8125rem;
  }
  
  /* Cards */
  .card {
    padding: var(--spacing-md);
  }
  
  .card-title {
    font-size: 1.25rem;
  }
  
  .casino-card-image {
    height: 120px;
  }
  
  .casino-icon {
    font-size: 3rem;
  }
  
  /* Accordion */
  .accordion-header {
    padding: var(--spacing-md);
  }
  
  .accordion-title {
    font-size: 1rem;
  }
  
  .accordion-icon {
    font-size: 1rem;
  }
  
  .accordion-body {
    padding: 0 var(--spacing-md) var(--spacing-md) var(--spacing-md);
  }
  
  /* Tabs */
  .tabs-header {
    gap: var(--spacing-xs);
  }
  
  .tab-button {
    padding: var(--spacing-sm) var(--spacing-md);
    font-size: 0.875rem;
  }
  
  /* Tables */
  table {
    font-size: 0.875rem;
  }
  
  th, td {
    padding: var(--spacing-xs) var(--spacing-sm);
  }
  
  /* Make tables scrollable on mobile */
  .table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Stats Ticker */
  .ticker-item {
    padding: 0 var(--spacing-md);
  }
  
  .ticker-icon {
    font-size: 1.5rem;
  }
  
  .ticker-info h4 {
    font-size: 1rem;
  }
  
  .ticker-info p {
    font-size: 0.75rem;
  }
  
  /* Forms */
  .form-input,
  .form-select,
  .form-textarea {
    padding: 0.625rem 0.875rem;
    font-size: 0.9375rem;
  }
  
  /* Filter Panel */
  .filter-panel {
    padding: var(--spacing-md);
  }
  
  .filter-group {
    flex-direction: column;
    align-items: stretch;
    gap: var(--spacing-sm);
  }
  
  .filter-select {
    width: 100%;
  }
  
  /* Footer */
  .footer {
    padding: var(--spacing-xl) 0 var(--spacing-md) 0;
  }
  
  .footer-grid {
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
  }
  
  .footer-section {
    text-align: center;
  }
  
  .footer-section h4 {
    font-size: 1.125rem;
  }
  
  .footer-links {
    text-align: center;
  }
  
  /* Video */
  .video-wrapper {
    border-radius: var(--radius-md);
  }
  
  /* Badges */
  .badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
  }
}

/* ========== SMALL MOBILE (max-width: 480px) ========== */
@media (max-width: 480px) {
  /* Typography */
  html {
    font-size: 13px;
  }
  
  h1 {
    font-size: 1.75rem;
  }
  
  h2 {
    font-size: 1.5rem;
  }
  
  h3 {
    font-size: 1.25rem;
  }
  
  /* Layout */
  .block {
    padding: var(--spacing-lg) 0;
  }
  
  .block-title {
    font-size: 1.5rem;
  }
  
  :root {
    --container-padding: 12px;
  }
  
  /* Hero */
  .hero h1 {
    font-size: 1.75rem;
  }
  
  .hero-description {
    font-size: 0.9375rem;
  }
  
  /* Cards */
  .card {
    padding: var(--spacing-sm);
  }
  
  .card-title {
    font-size: 1.125rem;
  }
  
  .casino-card-image {
    height: 100px;
  }
  
  .casino-icon {
    font-size: 2.5rem;
  }
  
  /* Buttons */
  .btn {
    padding: 0.625rem 1.25rem;
    font-size: 0.875rem;
  }
  
  /* Footer */
  .footer-section h4 {
    font-size: 1rem;
  }
  
  /* Page Navigation */
  .page-nav-link {
    font-size: 0.8125rem;
    padding: 0.375rem 0.75rem;
  }
  
  /* Accordion */
  .accordion-title {
    font-size: 0.9375rem;
  }
}

/* ========== LARGE DESKTOP (min-width: 1440px) ========== */
@media (min-width: 1440px) {
  :root {
    --container-max: 1320px;
  }
  
  html {
    font-size: 17px;
  }
  
  .block-title {
    font-size: 3rem;
  }
  
  .hero h1 {
    font-size: 4rem;
  }
  
  .hero-description {
    font-size: 1.375rem;
  }
}

/* ========== LANDSCAPE ORIENTATION ========== */
@media (max-width: 768px) and (orientation: landscape) {
  .hero {
    padding: var(--spacing-lg) 0;
  }
  
  .block {
    padding: var(--spacing-lg) 0;
  }
}

/* ========== PRINT STYLES ========== */
@media print {
  .header,
  .footer,
  .page-nav,
  .mobile-menu-toggle,
  .btn,
  .filter-panel {
    display: none;
  }
  
  body {
    font-size: 12pt;
    color: #000;
    background: #fff;
  }
  
  a {
    color: #000;
    text-decoration: underline;
  }
  
  .block {
    page-break-inside: avoid;
  }
  
  h1, h2, h3 {
    page-break-after: avoid;
  }
}

/* ========== REDUCED MOTION ========== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ========== HIGH CONTRAST MODE ========== */
@media (prefers-contrast: high) {
  :root {
    --primary: #000000;
    --text: #ffffff;
    --background: #000000;
    --background-light: #ffffff;
  }
  
  .card,
  .accordion,
  .filter-panel {
    border: 2px solid #000;
  }
}

/* ========== DARK MODE (если понадобится) ========== */
@media (prefers-color-scheme: dark) {
  /* Оставим светлую тему по умолчанию, но структура готова */
}
