@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700;800;900&display=swap');
@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css');

html,
body {
    margin: 0;
    padding: 0;
}

body {
    font-family: "Inter", sans-serif;
    background: linear-gradient(135deg, #0a0a1a 0%, #150a20 100%);
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
    margin: 0;
    position: relative;
    overflow-y: auto;
    overflow-x: hidden;
}

/* Abstract background shapes for layering effect - similar to home screen */
.background-shape {
    position: fixed;
    background-color: rgba(59, 130, 246, 0.1);
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.5;
    animation: floatAndPulse 15s infinite alternate ease-in-out;
    z-index: 1;
    pointer-events: none;
}

.shape-1 {
    width: 350px;
    height: 350px;
    top: 5%;
    left: -10%;
    background-color: rgba(14, 165, 233, 0.18);
    animation-delay: 0s;
}

.shape-2 {
    width: 450px;
    height: 450px;
    bottom: 0%;
    right: -15%;
    background-color: rgba(139, 92, 246, 0.18);
    animation-delay: 5s;
}

.shape-3 {
    width: 250px;
    height: 250px;
    top: 55%;
    left: 15%;
    background-color: rgba(236, 72, 153, 0.15);
    animation-delay: 10s;
}

@keyframes floatAndPulse {
    0% {
        transform: scale(1) translate(0, 0);
        opacity: 0.5;
    }

    33% {
        transform: scale(1.05) translate(15px, -15px);
        opacity: 0.6;
    }

    66% {
        transform: scale(0.98) translate(-10px, 10px);
        opacity: 0.4;
    }

    100% {
        transform: scale(1) translate(0, 0);
        opacity: 0.5;
    }
}

/* Fixed Top Header */
.top-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background-color: rgba(26, 32, 44, 0.95);
    backdrop-filter: blur(15px) saturate(180%);
    -webkit-backdrop-filter: blur(15px) saturate(180%);
    border-bottom: 1px solid rgba(55, 65, 81, 0.4);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
    padding-top: max(env(safe-area-inset-top), 0.5rem);
    padding-left: max(env(safe-area-inset-left), 1rem);
    padding-right: max(env(safe-area-inset-right), 1rem);
    padding-bottom: 0.5rem;
    z-index: 30;
}

.header-logo {
    height: 35px;
    width: auto;
}

.header-menu-button {
    background: none;
    border: none;
    color: #0ea5e9;
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.2s;
    padding: 0.5rem;
}

.header-menu-button:hover {
    color: #3b82f6;
}

/* Menu Dropdown Styles */
.menu-dropdown {
    position: fixed;
    top: 70px;
    right: 1rem;
    width: 200px;
    background-color: rgba(26, 32, 44, 0.9);
    backdrop-filter: blur(15px) saturate(180%);
    -webkit-backdrop-filter: blur(15px) saturate(180%);
    border: 1px solid rgba(55, 65, 81, 0.4);
    border-radius: 1rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    padding: 0.5rem;
    display: none;
    z-index: 50;
    flex-direction: column;
}

.menu-item {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    color: #e2e8f0;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s;
    border-radius: 0.75rem;
    text-decoration: none;
}

.menu-item:hover {
    background-color: rgba(55, 65, 81, 0.5);
    color: #0ea5e9;
}

.menu-item i {
    margin-right: 1rem;
    font-size: 1.2rem;
    color: #a0aec0;
    transition: color 0.2s;
}

.menu-item:hover i {
    color: #0ea5e9;
}

.menu-separator {
    width: 80%;
    height: 1px;
    background-color: rgba(143, 153, 170, 0.3);
    margin: 0.5rem auto;
    border: none;
}

.main-content {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.8), 0 0 40px rgba(0, 0, 0, 0.4) inset;
    background: transparent;
    backdrop-filter: blur(15px) saturate(180%);
    -webkit-backdrop-filter: blur(15px) saturate(180%);
    padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
    padding-top: 80px;
    padding-bottom: 120px;
    padding-left: max(env(safe-area-inset-left), 1.5rem);
    padding-right: max(env(safe-area-inset-right), 1.5rem);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    color: #e2e8f0;
    box-sizing: border-box;
    position: relative;
    z-index: 1;
    min-height: 100vh;
}

/* Bars container default padding */
.bars-container {
    padding: 20px;
}

/* Mobile devices - remove left and right padding */
@media (max-width: 768px) {
    .top-header {
        position: relative;
        /* Change from fixed to relative so it scrolls with the page */
    }

    .main-content {
        padding-left: 10px;
        padding-right: 10px;
        padding-top: 20px;
    }

    .song-editor-content.ms_weekly_inner {
        padding-left: 0px !important;
        padding-right: 0px !important;
    }

    .section-editor.ms_weekly_box {
        padding: 0px !important;
        background: transparent !important;
        border: none !important;
    }

    .bars-container {
        padding: 0px !important;
    }

    .song-editor-container[data-mode="view"] .editable-cell.chord-cell {
        padding: 4px !important;
    }

    /* Enhanced mobile lyrics wrapping */
    .lyrics-cell-with-arrow .lyrics-input {
        min-height: 1.2em;
        word-wrap: break-word;
        overflow-wrap: break-word;
        color: white !important;
    }

    .editable-cell.lyrics-cell {
        padding: 6px 6px 10px 6px !important;
        min-height: 32px;
    }

    /* Ensure lyrics textarea is white on mobile */
    [data-mode="view"] .editable-cell textarea.lyrics-input {
        color: white !important;
    }
}

/* Mobile Home Page PillButton Styles */


.PillButton.mobile-home-gray {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4), 0 0 15px rgba(74, 85, 104, 0.3) inset;
    background-image: linear-gradient(45deg, #4a5568 0%, #6b7280 100%);
    color: #e2e8f0;
}

.PillButton.mobile-home-gray:hover {
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.7), 0 0 25px rgba(107, 114, 128, 0.6) inset;
    filter: brightness(1.15);
}