/* Mobile Optimization for GratisDobbelSteen.nl */

/* Mobile First Approach - < 768px */
@media (max-width: 768px) {
  
  /* Typography adjustments */
  body {
    font-size: 14px;
  }
  
  .hero h2 {
    font-size: 1.5rem;
    padding: 0 1rem;
  }
  
  .subtitle {
    font-size: 1rem;
  }
  
  /* Navigation */
  .logo h1 {
    font-size: 1.2rem;
  }
  
  .language-switcher {
    font-size: 0.85rem;
  }
  
  /* Scene buttons - stack on mobile */
  .scene-buttons {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .scene-btn {
    padding: 0.75rem;
  }
  
  .scene-btn .icon {
    font-size: 1.5rem;
  }
  
  /* Tabs - hide on mobile, show grid instead */
  .tabs {
    display: none !important;
  }
  
  .dice-grid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    margin-top: 1rem;
  }
  
  .grid-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    background: var(--bg-color);
    border: 2px solid transparent;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
  }
  
  .grid-btn:active {
    transform: scale(0.95);
    border-color: var(--secondary-color);
  }
  
  .grid-btn .icon {
    font-size: 1.5rem;
  }
  
  /* Color selector - make scrollable on mobile */
  .color-selector {
    display: flex;
    overflow-x: auto;
    gap: 0.5rem;
    padding-bottom: 0.5rem;
    -webkit-overflow-scrolling: touch;
  }
  
  .color-option {
    flex-shrink: 0;
  }
  
  /* Quick buttons - smaller on mobile */
  .quick-buttons {
    gap: 0.5rem;
  }
  
  .count-btn {
    min-width: 50px;
    padding: 0.75rem;
  }
  
  /* Canvas - adjusted height */
  .dice-canvas-container {
    height: 300px;
  }
  
  /* Roll button - full width on mobile */
  .roll-btn {
    width: 100%;
    max-width: 100%;
    padding: 1.25rem 2rem;
    font-size: 1.3rem;
  }
  
  .hint {
    font-size: 0.85rem;
  }
  
  /* Tool controls - stack vertically */
  .tool-controls {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
  }
  
  .icon-btn {
    width: 100%;
    justify-content: center;
  }
  
  /* Results section - adjust layout */
  .dice-results {
    gap: 0.75rem;
  }
  
  .dice-value {
    width: 50px;
    height: 50px;
    font-size: 1.25rem;
  }
  
  .stats-summary {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }
  
  .stat-item {
    padding: 0.75rem;
  }
  
  .stat-item .value {
    font-size: 1.25rem;
  }
  
  /* Share buttons - stack on mobile */
  .share-buttons {
    flex-direction: column;
    gap: 0.75rem;
  }
  
  .share-btn {
    width: 100%;
    justify-content: center;
  }
  
  /* History items - compact */
  .history-item {
    padding: 0.75rem;
    font-size: 0.9rem;
  }
  
  /* Charts - better mobile sizing */
  .charts-container {
    grid-template-columns: 1fr;
  }
  
  .chart-box {
    min-height: 250px;
  }
  
  /* Modal - full screen on mobile */
  .modal-overlay {
    padding: 0;
  }
  
  .modal-content {
    max-width: 100%;
    width: 100%;
    max-height: 100vh;
    border-radius: 0;
    padding: 1.5rem;
  }
  
  /* Settings modal - optimize for mobile */
  .setting-group {
    margin-bottom: 1.5rem;
  }
  
  .sound-controls {
    font-size: 0.9rem;
  }
  
  .volume-slider {
    width: 100%;
  }
  
  /* Cookie banner - stack on mobile */
  .cookie-content {
    flex-direction: column;
    text-align: center;
  }
  
  .cookie-actions {
    width: 100%;
    justify-content: center;
  }
  
  /* Footer - adjust columns */
  .footer-container {
    grid-template-columns: 1fr;
    text-align: center;
  }
  
  .footer-bottom {
    font-size: 0.85rem;
  }
  
  /* Content sections - reduce padding */
  .content-section,
  .faq-section {
    padding: 2rem 0;
  }
  
  .faq-item {
    padding: 1rem;
  }
  
  /* Touch-friendly tap targets */
  button,
  .share-btn,
  .scene-btn,
  .count-btn {
    min-height: 44px;
    min-width: 44px;
  }
  
  /* Hide desktop-only elements */
  .desktop-only {
    display: none !important;
  }
  
  /* Spacing adjustments */
  .container {
    padding: 0 15px;
  }
  
  section {
    padding: 1.5rem 0;
  }
}

/* Small mobile devices - < 480px */
@media (max-width: 480px) {
  
  .hero h2 {
    font-size: 1.3rem;
  }
  
  .scene-buttons {
    grid-template-columns: 1fr;
  }
  
  .dice-grid {
    grid-template-columns: 1fr;
  }
  
  .stats-summary {
    grid-template-columns: 1fr;
  }
  
  .roll-btn {
    font-size: 1.2rem;
    padding: 1rem 1.5rem;
  }
  
  .dice-canvas-container {
    height: 250px;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  
  .dice-canvas-container {
    height: 250px;
  }
  
  .hero {
    padding: 2rem 0;
  }
  
  .hero h2 {
    font-size: 1.3rem;
  }
}

/* Touch device specific */
@media (hover: none) and (pointer: coarse) {
  
  /* Remove hover effects on touch devices */
  button:hover,
  .share-btn:hover,
  .scene-btn:hover {
    transform: none;
  }
  
  /* Add active states instead */
  button:active,
  .share-btn:active,
  .scene-btn:active {
    transform: scale(0.95);
    opacity: 0.9;
  }
  
  /* Increase touch target sizes */
  a,
  button,
  input,
  select {
    min-height: 44px;
    padding: 0.75rem;
  }
}

/* High DPI screens */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  /* Optimize for retina displays */
  .dice-value {
    border-width: 1px;
  }
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
