* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    width: 100%;
    overflow: hidden;
    background-color: #102216;
}

#app {
    height: 100vh;
    width: 100vw;
    display: flex;
    overflow: hidden;
    background-color: #102216;
}

.app-container {
    height: 100vh;
    width: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background-color: #102216;
}

.material-symbols-outlined {
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

/* Force button text colors on hover */
button span:hover,
button:hover span {
    color: inherit !important;
}

/* Mobile styles (default) */
@media (max-width: 768px) {
    /* Home screen mobile */
    .home-header {
        padding: 2vh;
        padding-bottom: 1vh;
        flex-shrink: 0;
        height: 7vh;
    }

    .home-content {
        flex: 1;
        overflow-y: auto;
        display: flex;
        flex-direction: column;
        padding: 0 2vh;
        padding-bottom: 12vh;
    }

    .home-hero {
        flex: 1;
        min-height: 25vh;
        max-height: 35vh;
        margin-top: 2vh;
        margin-bottom: 1.5vh;
        margin-left: 1vh;
        margin-right: 1vh;
    }

    .home-cta {
        width: auto;
        height: 6vh;
        min-height: 48px;
        padding: 0.5vh 1.5vh;
        gap: 0.5vh;
    }

    .home-nav {
        height: 10vh;
        min-height: 70px;
        flex-shrink: 0;
        padding-bottom: env(safe-area-inset-bottom, 0px);
    }

    /* Workout screen mobile */
    .workout-header {
        padding: 2vh;
        padding-top: max(2vh, env(safe-area-inset-top, 0px));
        flex-shrink: 0;
        height: 7vh;
    }

    .workout-content {
        flex: 1;
        overflow-y: hidden;
        display: flex;
        flex-direction: column;
        padding: 2vh;
        padding-bottom: 1vh;
    }

    .workout-video {
        height: 28vh;
        max-height: 300px;
        margin-bottom: 1.5vh;
        flex-shrink: 0;
    }

    .workout-timer {
        font-size: 3rem;
    }

    .workout-controls {
        gap: 1vh;
        flex-shrink: 0;
        padding-bottom: max(2vh, env(safe-area-inset-bottom, 1vh));
    }

    .workout-controls button {
        min-width: 8vh;
        height: 7vh;
        min-height: 50px;
        padding: 0 1.5vh;
        font-size: 0.875rem;
    }
    
    /* Exercises screen mobile */
    .exercises-header {
        height: 7vh;
        min-height: 60px;
    }
    
    .exercises-main {
        padding-bottom: 18vh !important;
    }
    
    /* Floating button at bottom */
    .pointer-events-none.fixed {
        padding-bottom: max(2vh, env(safe-area-inset-bottom, 1rem));
    }
    
    /* Congratulations screen mobile */
    .congrats-header {
        height: 7vh;
        padding-top: max(2vh, env(safe-area-inset-top, 0px));
    }
    
    /* Congratulations footer */
    .app-container footer {
        padding-bottom: max(2vh, env(safe-area-inset-bottom, 1rem)) !important;
    }
    
    /* Achievements screen mobile */
    .achievements-header {
        height: 7vh;
        min-height: 60px;
    }
    
    .achievements-main {
        padding: 1rem;
        padding-bottom: 3vh;
    }
}

/* Desktop styles */
@media (min-width: 769px) {
    html, body {
        background-color: #f5f8f6 !important;
        overflow: auto;
    }

    #app {
        justify-content: center;
        align-items: center;
        background-color: #f5f8f6 !important;
        overflow: auto;
    }

    .app-container {
        width: 430px;
        max-width: 95vw;
        height: 95vh;
        max-height: 95vh;
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
        border-radius: 1rem;
        background-color: #102216 !important;
    }

    .home-header {
        padding: 1rem;
        padding-bottom: 0.75rem;
        flex-shrink: 0;
        height: 8vh;
        max-height: 60px;
    }

    .home-content {
        flex: 1;
        overflow-y: auto;
        display: flex;
        flex-direction: column;
        padding: 0 1rem;
        min-height: 0;
    }

    .home-hero {
        flex: 1;
        min-height: 200px;
        margin-top: 1rem;
        margin-bottom: 1rem;
    }

    .home-content h1 {
        padding-top: 0 !important;
        padding-bottom: 0.5rem !important;
        font-size: clamp(1.5rem, 3vh, 2rem) !important;
    }

    .home-content p {
        padding-bottom: 1rem !important;
    }

    .home-content .flex-grow {
        flex-grow: 1;
        min-height: 1rem;
    }

    .home-content > div:has(.home-cta) {
        padding: 1rem 0 !important;
        flex-shrink: 0;
    }

    .home-cta {
        width: auto;
        height: 7vh;
        min-height: 48px;
        max-height: 56px;
        padding: 0.75rem 1.5rem;
        gap: 0.75rem;
    }

    .home-nav {
        height: 12vh;
        min-height: 80px;
        max-height: 100px;
        flex-shrink: 0;
    }

    /* Workout screen desktop */
    .workout-header {
        padding: 1rem;
        flex-shrink: 0;
        height: 8vh;
        max-height: 60px;
    }

    .workout-content {
        flex: 1;
        overflow-y: hidden;
        display: flex;
        flex-direction: column;
        padding: 1rem 1.5rem;
        min-height: 0;
    }

    .workout-video {
        height: 35vh;
        min-height: 250px;
        max-height: 350px;
        margin-bottom: 1rem;
        flex-shrink: 0;
    }

    .workout-timer {
        font-size: clamp(2.5rem, 5vh, 4rem);
    }

    .workout-controls {
        gap: 1rem;
        flex-shrink: 0;
        padding: 1rem 0;
    }

    .workout-controls button {
        min-width: 100px;
        height: 7vh;
        min-height: 50px;
        max-height: 60px;
        padding: 0 1.25rem;
        font-size: 1rem;
    }

    /* Congratulations screen desktop */
    .congrats-header {
        padding: 1rem;
        flex-shrink: 0;
        height: 8vh;
        max-height: 60px;
    }

    .congrats-main {
        flex: 1;
        overflow-y: auto;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: 2rem;
        min-height: 0;
    }

    .congrats-icon {
        width: 80px;
        height: 80px;
    }

    .congrats-title {
        font-size: clamp(2rem, 4vh, 2.5rem);
    }

    .congrats-stats {
        max-width: 600px;
    }

    .congrats-footer {
        max-width: 600px;
        padding: 1.5rem;
        flex-shrink: 0;
    }

    /* Exercises screen desktop */
    .exercises-header {
        padding: 1rem;
        flex-shrink: 0;
        height: 8vh;
        max-height: 60px;
    }

    .exercises-main {
        flex: 1;
        overflow-y: auto;
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
        padding: 0.75rem;
        padding-bottom: 5rem;
        min-height: 0;
    }

    .exercises-main > div {
        padding: 0.75rem !important;
    }

    .exercises-main p {
        font-size: 0.875rem !important;
    }

    /* Achievements screen desktop */
    .achievements-header {
        padding: 1rem;
        flex-shrink: 0;
        height: 8vh;
        max-height: 60px;
    }

    .achievements-main {
        flex: 1;
        overflow-y: auto;
        display: flex;
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
        min-height: 0;
    }

    .achievement-item {
        max-width: 600px;
        margin: 0 auto;
    }
}
