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

html {
    height: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #09090b;
    color: #fafafa;
    height: 100%;
    margin: 0;
    overflow: hidden;
}

/* App Layout */
.app-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    position: relative;
    overflow: hidden;
}

.app-container.hidden {
    display: none;
}

/* Mobile Menu Button */
.menu-btn {
    display: none;
    position: fixed;
    top: 16px;
    right: 16px;
    width: 44px;
    height: 44px;
    border-radius: 10px;
    border: 1px solid #27272a;
    background: #18181b;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    color: #a1a1aa;
    z-index: 100;
    transition: all 0.15s ease;
}

.menu-btn:hover {
    background: #27272a;
    color: #fafafa;
}

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

/* Mobile Menu Overlay */
.menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 150;
    align-items: flex-start;
    justify-content: flex-end;
    padding: 70px 16px 16px;
}

.menu-overlay.visible {
    display: flex;
}

.menu-panel {
    background: #18181b;
    border: 1px solid #27272a;
    border-radius: 12px;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 180px;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 8px;
    border: none;
    background: transparent;
    color: #a1a1aa;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.15s ease;
    text-align: left;
}

.menu-item:hover {
    background: #27272a;
    color: #fafafa;
}

.menu-item svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

/* Practice Wrapper with widgets on left */
.practice-wrapper {
    display: flex;
    gap: 12px;
    width: 100%;
    max-width: 520px;
    justify-content: center;
}

/* Widget Buttons */
.widget-buttons {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex-shrink: 0;
    align-self: center;
    margin-top: -140px;
}

.widget-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 10px 10px 8px;
    border-radius: 10px;
    border: 1px solid #27272a;
    background: #18181b;
    color: #52525b;
    cursor: pointer;
    transition: all 0.15s ease;
    min-width: 56px;
}

.widget-btn:hover {
    background: #27272a;
    border-color: #3f3f46;
    color: #fafafa;
}

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

.widget-label {
    font-size: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Back Button */
.back-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 8px;
    border: 1px solid #27272a;
    background: #18181b;
    color: #a1a1aa;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.back-btn:hover {
    background: #27272a;
    color: #fafafa;
}

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

/* Pages */
.page {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow-y: auto;
    overflow-x: hidden;
}

.page.hidden {
    display: none;
}

.container {
    width: 100%;
}

/* Mobile */
@media (max-width: 768px) {
    .menu-btn {
        display: flex;
    }

    .widget-buttons {
        display: none;
    }

    .practice-wrapper {
        max-width: 100%;
        justify-content: center;
    }

    .page {
        padding: 20px;
        padding-top: 70px;
    }

    .container {
        max-width: 100%;
    }

    .back-btn {
        align-self: flex-start;
    }
}
