@import url('https://fonts.googleapis.com/css2?family=Nunito:ital,wght@0,200..1000;1,200..1000&display=swap');
@import url('./ui-effects.css');
@import url('./cp-tooltips-style.css');

:root {
    --bg: #ffffff;
    --btn-green: #c1d82f;
    --btn-hover: #99ad18;
    --dot: #c3d22b;

    --page-bg-color: #ffffff;

    --star: #eab308;
    --badge-bg: #fce4ec;

    --search-bg: #ffffff;
    --app-bg: #ffffff;
    --border: #e0e0dbe0;
    --text-main: #1a1a1a;
    --text-muted: #5e5e5e;
    --bg-hover: rgba(0, 0, 0, 0.04);
}

body {
    font-family: "Nunito", sans-serif !important;
    -webkit-font-smoothing: antialiased;
    color: var(--text-main);
    background: var(--bg); 
    padding: 0; margin: 0;
}

.main-page {
    position: relative;
    display: flex;
    width: 100%;
    min-height: calc(100vh - 60px); 
    background-color: var(--page-bg-color); 
}

.page-content {
    flex: 1;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 24px 24px 24px 100px; 
}

.main-sidebar {
    position: fixed; 
    top: 50%; 
    left: 20px; 
    transform: translateY(-50%); 
    z-index: 500; 
    background: var(--search-bg, #ffffff);
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    border: 1px solid var(--border, #d4d3ca);
    padding: 16px 12px;
}

.sidebar-list {
    display: flex;
    flex-direction: column;
    gap: 12px; 
}

.sidebar-option button {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 64px;
    height: 64px;
    background: transparent;
    border: none;
    border-radius: 14px;
    color: var(--text-muted, #5e5e5e);
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-option button:hover {
    background: var(--bg-hover, rgba(0, 0, 0, 0.05));
    color: var(--btn-green, #4f6c14); 
    transform: translateY(-2px); 
}

.sidebar-option button:active {
    transform: translateY(0);
}

.option-icon svg {
    width: 22px;
    height: 22px;
    transition: transform 0.2s ease;
}

.sidebar-option button:hover .option-icon svg {
    transform: scale(1.1); 
}

.sidebar-option span {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

@media (max-width: 768px) {
    .page-content {
        padding: 16px 16px calc(90px + env(safe-area-inset-bottom, 0px)) 16px; 
    }

    .main-sidebar {
        top: auto;
        bottom: 0;
        left: 0;
        transform: none;
        width: 100%;
        border-radius: 20px 20px 0 0; 
        border-left: none;
        border-right: none;
        border-bottom: none;
        border-top: 1px solid var(--border);
        padding: 8px 12px calc(8px + env(safe-area-inset-bottom, 0px)) 12px;
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
        box-sizing: border-box;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
    }

    .sidebar-list {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        gap: 4px;
        margin: 0;
        padding: 0;
    }

    .sidebar-option {
        flex: 1;
        display: flex;
        justify-content: center;
        min-width: 0;
    }

    .sidebar-option button {
        width: 100%;
        max-width: 72px;
        height: 56px; 
        gap: 4px;
        padding: 6px 2px;
        border-radius: 12px;
    }

    .option-icon svg {
        width: 24px;
        height: 24px;
    }

    .sidebar-option span {
        font-size: 0.65rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        width: 100%;
    }

    .sidebar-option button.active {
        color: var(--btn-green);
    }
}

@media (max-width: 380px) {
    .sidebar-option span {
        display: none;
    }
    
    .sidebar-option button {
        height: 48px;
        justify-content: center;
    }
}