/**
 * CheeseClue - Responsive Styles
 * Media queries and responsive design adjustments
 */

/* Desktop/Tablet Layout */
@media (min-width: 768px) {
    .hero-mobile {
        display: none !important;
    }
    
    #game-container {
        padding-top: 1rem;
    }
    
    .hero-desktop {
        display: block;
    }
    
    #toggle-keyboard {
        display: none !important;
    }
}

/* Mobile Portrait Layout */
@media (max-width: 767px) {
    .hero-desktop {
        display: none !important;
    }
    
    #game-container {
        padding-top: 80px;
        width: 95vw;
        padding: 80px 5px 200px 5px;
    }
    
    .hero-mobile {
        display: flex;
    }
    
    #guess-rows {
        padding: 0 5px;
    }
    
    .guess-row {
        padding: 3px 0;
        margin-bottom: 0.4rem;
    }
    
    .row-content {
        padding: 4px 0;
        min-height: calc(var(--box-size, 40px) + 8px);
    }
}

/* Small Mobile Devices */
@media (max-width: 480px) {
    #game-container {
        padding: 80px 2px 200px 2px;
    }
    
    #guess-rows {
        padding: 0 2px;
    }
}

/* Extra Small Mobile Devices */
@media (max-width: 360px) {
    .hero-mobile {
        padding: 8px 10px;
        min-height: 50px;
    }
    
    .hero-mobile .title {
        font-size: 1rem;
    }
    
    .hero-mobile .subtitle {
        font-size: 0.7rem;
    }
    
    .hero-mobile .info-icon,
    .hero-mobile .star-icon {
        width: 32px;
        height: 32px;
        font-size: 1rem;
    }
}

/* Landscape Orientation */
@media (orientation: landscape) and (max-width: 896px) {
    #game-container {
        padding-bottom: 160px;
    }
    
    #keyboard-area {
        padding: 8px 6px 10px 6px;
    }
    
    .keyboard-row {
        margin: 2px 0;
    }
    
    .key {
        height: 36px;
    }
}

/* iPad Pro and Large Tablets */
@media (min-width: 1024px) and (max-width: 1366px) {
    #game-container {
        width: 80vw;
        max-width: 1000px;
    }
    
    .hero-desktop h1 {
        font-size: 3rem;
    }
    
    .hero-desktop p {
        font-size: 1.3rem;
    }
}

/* High Resolution Screens */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .box,
    .key {
        border-width: 1.5px;
    }
}

/* Print Styles */
@media print {
    #bgCanvas,
    #keyboard-area,
    .hero-mobile,
    .hero-desktop .icon-group,
    .modal {
        display: none !important;
    }
    
    #game-container {
        box-shadow: none;
        border: 1px solid #000;
        padding-bottom: 1rem;
    }
    
    .box {
        border: 1px solid #000 !important;
    }
    
    .box.correct {
        background-color: #000 !important;
        color: #fff !important;
    }
    
    .box.present {
        background-color: #666 !important;
        color: #fff !important;
    }
    
    .box.absent {
        background-color: #ccc !important;
        color: #000 !important;
    }
}

/* Accessibility - Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .shake {
        animation: none;
    }
    
    #bgCanvas {
        display: none;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    /* Future dark mode styles */
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
    .key:hover {
        background-color: #f8f9fa;
        transform: none;
    }
    
    .box {
        cursor: default;
    }
}

/* Foldable Device Support */
@media (max-width: 280px) {
    #game-container {
        width: 100vw;
        padding: 60px 2px 150px 2px;
    }
    
    .hero-mobile {
        min-height: 45px;
        padding: 6px 8px;
    }
    
    .hero-mobile .title {
        font-size: 0.9rem;
    }
    
    .hero-mobile .subtitle {
        display: none;
    }
    
    .box {
        width: 28px !important;
        height: 28px !important;
        font-size: 0.8rem !important;
    }
    
    .key {
        height: 32px;
        max-width: 30px;
        font-size: 0.75rem;
    }
}