/* ========================================
   FRACTALLA - Responsive Styles
   Mobile Optimizations & Media Queries
   ======================================== */

/* ========================================
   RESPONSIVE - Mobile
   ======================================== */
@media (max-width: 900px) {
    /* Show mobile share button */
    .mobile-share-btn {
        display: flex !important;
    }

    /* Hide when controls are visible */
    body.mobile-controls-visible .mobile-share-btn {
        display: none !important;
    }

    .floating-header {
        top: 1.5rem;
    }

    .brand h1 {
        font-size: 2.5rem;
        letter-spacing: 0.2em;
    }

    .tagline {
        font-size: 0.6rem;
        letter-spacing: 0.35em;
    }

    .playback-controls {
        top: 7rem;
        padding: 0.6rem 1rem;
        gap: 1rem;
        scale: 0.9;
    }

    .speed-control input[type="range"] {
        width: 80px;
    }

    .speed-control label {
        font-size: 0.65rem;
    }

    body.mobile-controls-visible .playback-controls {
        display: none;
    }

    #canvas-container {
        width: 90vw;
        height: 90vw;
        z-index: 1;
        /* Ensure canvas doesn't cover controls */
    }

    /* Hide orb controls on mobile - use mobile toggle instead */
    .control-orbs {
        display: none !important;
    }

    /* Show mobile toggle button */
    .mobile-controls-toggle {
        display: block !important;
        bottom: 10px;
        z-index: 1500 !important;
        /* Above canvas and panel */
    }

    body.mobile-controls-visible .floating-header {
        display: none;
    }

    body.mobile-controls-visible #canvas-container {
        width: min(35vh, 80vw);
        height: min(35vh, 80vw);
        top: 20vh;
        transform: translate(-50%, -50%);
    }

    body.mobile-controls-visible .control-orbs {
        display: none !important;
    }

    /* Custom controls panel mobile behavior */
    .controls-panel {
        position: fixed !important;
        top: auto !important;
        bottom: 10px !important;
        right: 0 !important;
        left: 0 !important;
        transform: translateY(calc(100% + 10px)) !important;
        width: 100% !important;
        max-width: 100% !important;
        max-height: 55vh !important;
        overflow-y: auto !important;
        margin: 0 !important;
        border-radius: 0 !important;
        transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
    }

    .controls-panel.mobile-expanded {
        transform: translateY(0) !important;
    }

    .controls-panel.mobile-collapsed {
        transform: translateY(calc(100% + 10px)) !important;
    }

    /* Remove spacing between control sections on mobile */
    .control-section {
        margin-bottom: 0 !important;
    }
}

@media (max-width: 480px) {
    .brand h1 {
        font-size: 2rem;
        letter-spacing: 0.15em;
    }

    .tagline {
        font-size: 0.55rem;
    }

    .control-orbs {
        gap: 0.5rem;
    }

    .orb {
        width: 45px;
        height: 45px;
    }

    .orb-primary {
        width: 50px;
        height: 50px;
    }

    /* Adjust mobile share button for smaller screens */
    .mobile-share-btn {
        top: 1rem;
        right: 1rem;
        width: 45px;
        height: 45px;
    }

    .mobile-share-btn svg {
        width: 20px;
        height: 20px;
    }
}