/* COMPLETE UI REDESIGN - Actually Good This Time */

/* Reset the damage */
body {
    background: #000;
    overflow: hidden;
    margin: 0;
    padding: 0;
}

/* Hide everything on desktop for now - just show message */
@media (min-width: 1024px) {
    body.desktop-message::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: #000;
        z-index: 99999;
    }

    body.desktop-message::after {
        content: 'bloomscroll is designed for mobile.\A\A Open on your phone for the best experience.';
        white-space: pre;
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        font-family: 'Berkeley Mono', monospace;
        font-size: 14px;
        line-height: 1.8;
        color: rgba(255, 255, 255, 0.3);
        z-index: 100000;
        text-align: center;
        letter-spacing: 0.02em;
    }
}

/* Better Splash Screen */
.splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    cursor: pointer;
}

/* Remove all the stupid animations */
.splash-geometry {
    display: none;
}

/* Clean splash content */
.splash-content {
    text-align: center;
    padding: 40px;
}

/* No version badge bullshit */
.splash-version {
    display: none;
}

/* Clean title */
.splash-title {
    font-family: 'Berkeley Mono', monospace;
    font-size: 24px;
    font-weight: 400;
    letter-spacing: 0.1em;
    color: rgba(255, 255, 255, 0.8);
    margin: 0 0 24px 0;
}

/* Remove the stupid animated underline */
.splash-title::after {
    display: none;
}

/* Minimal description */
.splash-description {
    font-family: 'Berkeley Mono', monospace;
    font-size: 13px;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.4);
    margin: 0 0 40px 0;
    font-weight: 300;
}

.splash-description br {
    display: block;
    margin: 4px 0;
}

/* Remove feature grid */
.splash-features {
    display: none;
}

/* Simple continue hint */
.splash-continue {
    position: static;
    font-family: 'Berkeley Mono', monospace;
    font-size: 11px;
    letter-spacing: 0.1em;
    color: rgba(255, 255, 255, 0.25);
    animation: none;
    margin-top: 60px;
}

/* Remove header - it's stupid */
.app-header {
    display: none;
}

/* Remove terminal grid overlay - it's cringe */
.terminal-grid {
    display: none;
}

/* Fix the panel on mobile */
@media (max-width: 1023px) {
    .control-panel {
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        max-width: none !important;
        transform: translateY(calc(100% - 44px));
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        border-radius: 24px 24px 0 0 !important;
        background: rgba(10, 10, 10, 0.95) !important;
        backdrop-filter: blur(20px) !important;
        -webkit-backdrop-filter: blur(20px) !important;
    }

    .control-panel.expanded {
        transform: translateY(0);
    }

    /* Handle safe areas for content inside panel */
    .control-panel .panel-content {
        padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px));
    }

    /* Canvas should fill the screen */
    #p5js-container {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* No weird padding */
    body {
        padding: 0 !important;
    }
}

/* PWA adjustments */
@media (display-mode: standalone) {
    .control-panel {
        bottom: 0 !important;
        padding-bottom: 0 !important;
        /* The transform handles the positioning */
    }

    .control-panel .panel-content {
        padding-bottom: calc(24px + env(safe-area-inset-bottom));
    }
}

/* If we DO show desktop (remove the desktop-message class from body) */
@media (min-width: 1024px) {
    body:not(.desktop-message) .control-panel {
        position: fixed !important;
        bottom: 40px !important;
        left: 50% !important;
        transform: translateX(-50%) translateY(calc(100% - 44px));
        width: 440px !important;
        max-width: 440px !important;
        right: auto !important;
        border-radius: 20px !important;
        background: rgba(10, 10, 10, 0.9) !important;
        backdrop-filter: blur(30px) !important;
        -webkit-backdrop-filter: blur(30px) !important;
        border: 1px solid rgba(255, 255, 255, 0.05) !important;
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        max-height: calc(100vh - 120px);
        overflow: visible;
    }

    body:not(.desktop-message) .control-panel.expanded {
        transform: translateX(-50%) translateY(0);
    }

    body:not(.desktop-message) #p5js-container {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    body:not(.desktop-message) {
        padding: 0 !important;
    }
}