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

html, body {
    height: 100%;
    overflow: hidden;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: #000000;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    transition: background-color 0.5s ease;
}

.category-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    z-index: 200;
    transition: opacity 0.5s ease, visibility 0.5s ease;
    background-color: #000000;
}

.category-screen.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.category-title {
    font-size: clamp(2rem, 6vw, 4rem);
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 1rem;
    text-align: center;
    transition: color 0.5s ease;
}

.category-subtitle {
    font-size: clamp(0.875rem, 2vw, 1.25rem);
    font-weight: 700;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    margin-bottom: 3rem;
    transition: color 0.5s ease;
    opacity: 0.6;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    max-width: 1200px;
    width: 100%;
}

.category-btn {
    padding: 1.5rem 1rem;
    border: 2px solid;
    background: transparent;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    min-height: 120px;
}

.category-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.category-icon {
    font-size: 2rem;
}

.category-name {
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    transition: color 0.5s ease;
}

.slide-container {
    position: relative;
    width: 100%;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
}

.slide {
    position: absolute;
    width: 100%;
    max-width: 1200px;
    text-align: center;
    opacity: 0;
    visibility: hidden;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease, visibility 0.6s ease;
}

.slide.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.affirmation {
    font-size: clamp(3rem, 10vmin, 8rem);
    font-weight: 900;
    line-height: 1.1;
    text-transform: uppercase;
    letter-spacing: -0.02em;
    word-wrap: break-word;
    max-width: 100%;
    text-wrap: balance;
    transition: color 0.5s ease;
}

.affirmation-category {
    font-size: clamp(1rem, 3vw, 1.5rem);
    font-weight: 700;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    margin-bottom: 1rem;
    transition: color 0.5s ease;
    opacity: 0.7;
}

.slide-number {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    transition: color 0.5s ease;
    opacity: 0.5;
}

.navigation {
    position: fixed;
    right: 2rem;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    z-index: 100;
}

.nav-btn {
    width: 60px;
    height: 60px;
    border: 2px solid;
    background: transparent;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s ease;
    opacity: 0.3;
}

.nav-btn:hover:not(:disabled) {
    opacity: 1;
    transform: scale(1.1);
}

.nav-btn:disabled {
    opacity: 0.1;
    cursor: not-allowed;
}

.nav-btn svg {
    width: 24px;
    height: 24px;
}

.restart-btn {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    padding: 1rem 2rem;
    border: 2px solid;
    background: transparent;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0;
    visibility: hidden;
}

.restart-btn.visible {
    opacity: 1;
    visibility: visible;
}

.restart-btn:hover {
    transform: scale(1.05);
}

.healing-badge {
    position: fixed;
    top: 2rem;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    transition: color 0.5s ease;
    opacity: 0.4;
}

.slide-counter {
    position: fixed;
    top: 2rem;
    right: 2rem;
    font-size: 0.875rem;
    font-weight: 700;
    transition: color 0.5s ease;
    opacity: 0.4;
    letter-spacing: 0.1em;
}

.autoplay-container {
    position: fixed;
    bottom: 2rem;
    left: 2rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    z-index: 100;
}

.autoplay-btn {
    width: 60px;
    height: 60px;
    border: 2px solid;
    background: transparent;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s ease;
}

.autoplay-btn:hover {
    transform: scale(1.1);
}

.autoplay-btn svg {
    width: 24px;
    height: 24px;
}

.screenshot-btn {
    width: 44px;
    height: 44px;
    border: 2px solid;
    background: transparent;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s ease;
    opacity: 0.5;
    border-radius: 8px;
}

.screenshot-btn:hover {
    opacity: 1;
    transform: scale(1.1);
}

.screenshot-btn svg {
    width: 20px;
    height: 20px;
}

.screenshot-btn.active {
    opacity: 1;
}

.zen-mode .healing-badge,
.zen-mode .slide-counter,
.zen-mode .playing-indicator,
.zen-mode .slide-number,
.zen-mode .affirmation-category,
.zen-mode .navigation,
.zen-mode .autoplay-container,
.zen-mode .restart-btn,
.zen-mode .back-btn,
.zen-mode .category-screen,
.zen-mode .timer-bar {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.zen-mode .slide-container {
    padding: 4rem;
}

.timer-display {
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    transition: color 0.5s ease;
    opacity: 0.5;
    min-width: 60px;
}

.timer-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    height: 4px;
    background-color: var(--primary-color, #FFD700);
    width: 0%;
    transition: width 0.1s linear;
    z-index: 1000;
}

.playing-indicator {
    position: fixed;
    top: 5rem;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    transition: color 0.5s ease;
    opacity: 0;
    visibility: hidden;
}

.playing-indicator.visible {
    opacity: 0.6;
    visibility: visible;
}

.back-btn {
    position: fixed;
    top: 2rem;
    left: 2rem;
    padding: 0.75rem 1.5rem;
    border: 2px solid;
    background: transparent;
    font-family: 'Inter', sans-serif;
    font-size: 0.875rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    z-index: 100;
}

.back-btn svg {
    width: 16px;
    height: 16px;
}

/* Laptop / MacBook Pro */
@media (max-width: 1440px) {
    .category-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 1rem;
        max-width: 850px;
    }

    .affirmation {
        font-size: clamp(2rem, 6.5vmin, 4rem);
        line-height: 1.05;
        text-wrap: balance;
    }

    .affirmation-category {
        font-size: clamp(0.75rem, 1.5vw, 1rem);
        margin-bottom: 0.5rem;
    }

    .slide-container {
        padding: 1.5rem;
    }

    .category-title {
        font-size: clamp(1.5rem, 4vw, 2.5rem);
    }

    .category-subtitle {
        font-size: clamp(0.65rem, 1.25vw, 0.875rem);
        margin-bottom: 1.5rem;
    }

    .navigation {
        right: 1.25rem;
    }

    .nav-btn {
        width: 50px;
        height: 50px;
    }

    .nav-btn svg {
        width: 22px;
        height: 22px;
    }

    .back-btn {
        top: 1.25rem;
        left: 1.25rem;
        padding: 0.5rem 1rem;
        font-size: 0.7rem;
    }

    .back-btn svg {
        width: 14px;
        height: 14px;
    }

    .healing-badge {
        top: 1.25rem;
        font-size: 0.6rem;
    }

    .slide-counter {
        top: 1.25rem;
        right: 1.25rem;
        font-size: 0.7rem;
    }

    .playing-indicator {
        top: 3.5rem;
        font-size: 0.55rem;
    }

    .slide-number {
        bottom: 1.25rem;
        font-size: 0.75rem;
    }

    .autoplay-container {
        bottom: 1.25rem;
        left: 1.25rem;
        gap: 0.5rem;
    }

    .autoplay-btn {
        width: 50px;
        height: 50px;
    }

    .autoplay-btn svg {
        width: 22px;
        height: 22px;
    }

    .screenshot-btn {
        width: 38px;
        height: 38px;
    }

    .screenshot-btn svg {
        width: 18px;
        height: 18px;
    }

    .timer-display {
        font-size: 0.75rem;
        min-width: 45px;
    }

    .restart-btn {
        bottom: 1.25rem;
        right: 1.25rem;
        padding: 0.6rem 1.25rem;
        font-size: 0.75rem;
    }
}

/* Tablet Landscape */
@media (max-width: 1200px) {
    .category-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 1.25rem;
        max-width: 900px;
    }

    .affirmation {
        font-size: clamp(1.75rem, 6vmin, 4rem);
        line-height: 1.1;
        text-wrap: balance;
    }
}

/* Tablet Portrait */
@media (max-width: 1024px) {
    .category-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1rem;
        max-width: 700px;
    }

    .category-title {
        font-size: clamp(1.75rem, 5vw, 3rem);
    }

    .category-subtitle {
        font-size: clamp(0.65rem, 1.5vh, 0.875rem);
        margin-bottom: 2rem;
    }

    .affirmation {
        font-size: clamp(1.5rem, 6vmin, 3.5rem);
        line-height: 1.1;
        text-wrap: balance;
    }

    .affirmation-category {
        font-size: clamp(0.875rem, 2vw, 1.25rem);
    }

    .slide-container {
        padding: 1.25rem;
    }

    .navigation {
        right: 1.5rem;
    }

    .nav-btn {
        width: 55px;
        height: 55px;
    }

    .back-btn {
        top: 1.5rem;
        left: 1.5rem;
        padding: 0.6rem 1.25rem;
        font-size: 0.75rem;
    }

    .healing-badge {
        top: 1.5rem;
        font-size: 0.65rem;
    }

    .slide-counter {
        top: 1.5rem;
        right: 1.5rem;
        font-size: 0.75rem;
    }

    .playing-indicator {
        top: 4rem;
        font-size: 0.65rem;
    }

    .slide-number {
        bottom: 1.5rem;
        font-size: 0.875rem;
    }

    .autoplay-container {
        bottom: 1.5rem;
        left: 1.5rem;
        gap: 0.5rem;
    }

    .autoplay-btn {
        width: 55px;
        height: 55px;
    }

    .screenshot-btn {
        width: 40px;
        height: 40px;
    }

    .timer-display {
        font-size: 0.875rem;
    }

    .restart-btn {
        bottom: 1.5rem;
        right: 1.5rem;
        padding: 0.75rem 1.5rem;
        font-size: 0.875rem;
    }
}

/* Mobile Landscape */
@media (max-width: 768px) {
    .category-screen {
        padding: 1.5rem;
    }

    .category-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.75rem;
        max-width: 100%;
    }

    .category-btn {
        padding: 0.75rem 0.5rem;
        min-height: 80px;
    }

    .category-name {
        font-size: 0.75rem;
    }

    .category-icon {
        font-size: 1.25rem;
    }

    .slide-container {
        padding: 1.25rem;
    }

    .affirmation {
        font-size: clamp(1.25rem, 5vmin, 2.5rem);
        letter-spacing: -0.01em;
        line-height: 1.1;
        text-wrap: balance;
    }

    .affirmation-category {
        font-size: clamp(0.75rem, 1.5vw, 1rem);
        margin-bottom: 0.5rem;
    }

    .navigation {
        right: 1rem;
        gap: 0.75rem;
    }

    .nav-btn {
        width: 48px;
        height: 48px;
    }

    .nav-btn svg {
        width: 20px;
        height: 20px;
    }

    .back-btn {
        top: 1rem;
        left: 1rem;
        padding: 0.5rem 1rem;
        font-size: 0.65rem;
    }

    .back-btn svg {
        width: 14px;
        height: 14px;
    }

    .healing-badge {
        top: 1rem;
        font-size: 0.6rem;
    }

    .slide-counter {
        top: 1rem;
        right: 1rem;
        font-size: 0.7rem;
    }

    .playing-indicator {
        top: 3.5rem;
        font-size: 0.6rem;
    }

    .slide-number {
        bottom: 1.25rem;
        font-size: 0.75rem;
        letter-spacing: 0.15em;
    }

    .autoplay-container {
        bottom: 1.25rem;
        left: 1rem;
        gap: 0.5rem;
    }

    .autoplay-btn {
        width: 48px;
        height: 48px;
    }

    .autoplay-btn svg {
        width: 20px;
        height: 20px;
    }

    .screenshot-btn {
        width: 36px;
        height: 36px;
    }

    .screenshot-btn svg {
        width: 16px;
        height: 16px;
    }

    .timer-display {
        font-size: 0.75rem;
        min-width: 50px;
    }

    .restart-btn {
        bottom: auto;
        top: 1rem;
        right: 1rem;
        padding: 0.5rem 1rem;
        font-size: 0.65rem;
    }

    .zen-mode .slide-container {
        padding: 2rem;
    }
}

/* Mobile Portrait */
@media (max-width: 480px) {
    .category-screen {
        padding: 1rem;
    }

    .category-title {
        font-size: 1.5rem;
        margin-bottom: 0.25rem;
        letter-spacing: 0.05em;
    }

    .category-subtitle {
        font-size: 0.65rem;
        margin-bottom: 1.5rem;
        letter-spacing: 0.2em;
    }

    .category-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }

    .category-btn {
        padding: 0.5rem 0.25rem;
        min-height: 65px;
        border-width: 1.5px;
    }

    .category-name {
        font-size: 0.625rem;
        letter-spacing: 0.05em;
    }

    .category-icon {
        font-size: 1rem;
    }

    .slide-container {
        padding: 1rem;
    }

    .affirmation {
        font-size: clamp(1.1rem, 4vmin, 2rem);
        line-height: 1.15;
        letter-spacing: 0;
        text-wrap: balance;
    }

    .affirmation-category {
        font-size: clamp(0.625rem, 2vw, 0.875rem);
        margin-bottom: 0.25rem;
        letter-spacing: 0.2em;
    }

    .navigation {
        right: 0.75rem;
        gap: 0.5rem;
    }

    .nav-btn {
        width: 40px;
        height: 40px;
        border-width: 1.5px;
    }

    .nav-btn svg {
        width: 18px;
        height: 18px;
    }

    .back-btn {
        top: 0.75rem;
        left: 0.75rem;
        padding: 0.4rem 0.75rem;
        font-size: 0.55rem;
        border-width: 1.5px;
    }

    .back-btn svg {
        width: 12px;
        height: 12px;
    }

    .healing-badge {
        top: 0.75rem;
        font-size: 0.5rem;
        letter-spacing: 0.2em;
    }

    .slide-counter {
        top: 0.75rem;
        right: 0.75rem;
        font-size: 0.6rem;
    }

    .playing-indicator {
        top: 3rem;
        font-size: 0.5rem;
        letter-spacing: 0.15em;
    }

    .slide-number {
        bottom: 1rem;
        font-size: 0.625rem;
        letter-spacing: 0.1em;
    }

    .autoplay-container {
        bottom: 1rem;
        left: 0.75rem;
        gap: 0.35rem;
    }

    .autoplay-btn {
        width: 40px;
        height: 40px;
        border-width: 1.5px;
    }

    .autoplay-btn svg {
        width: 18px;
        height: 18px;
    }

    .screenshot-btn {
        display: none;
    }

    .timer-display {
        font-size: 0.625rem;
        min-width: 40px;
    }

    .restart-btn {
        top: 0.75rem;
        right: 5rem;
        padding: 0.4rem 0.75rem;
        font-size: 0.55rem;
        border-width: 1.5px;
    }

    .zen-mode .slide-container {
        padding: 1.5rem;
    }

    .timer-bar {
        height: 3px;
    }
}

/* Small Mobile */
@media (max-width: 360px) {
    .category-title {
        font-size: 1.25rem;
    }

    .category-grid {
        gap: 0.4rem;
    }

    .category-btn {
        min-height: 55px;
    }

    .category-name {
        font-size: 0.55rem;
    }

    .category-icon {
        font-size: 0.875rem;
    }

    .affirmation {
        font-size: clamp(1rem, 4vmin, 1.75rem);
        text-wrap: balance;
    }

    .nav-btn,
    .autoplay-btn {
        width: 36px;
        height: 36px;
    }

    .nav-btn svg,
    .autoplay-btn svg {
        width: 16px;
        height: 16px;
    }

    .back-btn,
    .restart-btn {
        padding: 0.35rem 0.6rem;
        font-size: 0.5rem;
    }
}

/* Landscape orientation on mobile */
@media (max-height: 500px) and (orientation: landscape) {
    .category-screen {
        padding: 1rem;
    }

    .category-title {
        font-size: 1.25rem;
        margin-bottom: 0.25rem;
    }

    .category-subtitle {
        margin-bottom: 1rem;
        font-size: 0.6rem;
    }

    .category-grid {
        grid-template-columns: repeat(6, 1fr);
        gap: 0.5rem;
        max-width: 100%;
    }

    .category-btn {
        padding: 0.5rem 0.25rem;
        min-height: 50px;
    }

    .category-name {
        font-size: 0.5rem;
    }

    .category-icon {
        font-size: 0.875rem;
    }

    .slide-container {
        padding: 0.75rem;
        height: 100%;
    }

    .affirmation {
        font-size: clamp(1rem, 5vmin, 2rem);
        text-wrap: balance;
    }

    .affirmation-category {
        font-size: clamp(0.5rem, 1.5vh, 0.75rem);
        margin-bottom: 0.25rem;
    }

    .navigation {
        right: 0.5rem;
    }

    .nav-btn {
        width: 32px;
        height: 32px;
    }

    .nav-btn svg {
        width: 16px;
        height: 16px;
    }

    .back-btn {
        top: 0.5rem;
        left: 0.5rem;
        padding: 0.3rem 0.5rem;
        font-size: 0.5rem;
    }

    .healing-badge,
    .slide-counter,
    .playing-indicator {
        font-size: 0.5rem;
        top: 0.5rem;
    }

    .slide-counter {
        right: 0.5rem;
    }

    .playing-indicator {
        top: 2rem;
    }

    .slide-number {
        bottom: 0.5rem;
        font-size: 0.5rem;
    }

    .autoplay-container {
        bottom: 0.5rem;
        left: 0.5rem;
    }

    .autoplay-btn {
        width: 32px;
        height: 32px;
    }

    .autoplay-btn svg {
        width: 16px;
        height: 16px;
    }

    .screenshot-btn {
        display: none;
    }

    .timer-display {
        font-size: 0.5rem;
    }

    .restart-btn {
        top: 0.5rem;
        right: 0.5rem;
        padding: 0.3rem 0.5rem;
        font-size: 0.5rem;
    }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .affirmation {
        font-weight: 800;
    }
}

/* Reduced motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        transition: none !important;
        animation: none !important;
    }
}

/* Dark mode support (though app is already dark) */
@media (prefers-color-scheme: dark) {
    body {
        background-color: #000000;
    }
}
