/* Japanese 50 Sounds - Navigation Bar Styles */
/* Adapted from 歌唱幸福論 with 50 Sounds color scheme */

/* Header - Fixed Navigation */
header {
    background: var(--accent-primary);
    backdrop-filter: blur(10px);
    padding: 1rem 0;
    position: fixed;
    width: 100%;
    left: 0;
    right: 0;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    overflow: visible;
    transition: height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    height: 90px;
    margin: 0;
}

/* Header expands when dropdown is hovered */
header:has(.dropdown:hover) {
    height: 340px;
    transition: height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Adjust body padding to account for fixed header */
body {
    padding-top: 100px;
}

nav {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 0 8rem;
    position: relative;
    min-height: 70px;
    width: 100%;
    box-sizing: border-box;
}

.logo {
    font-size: 1.4rem;
    font-weight: 600;
    color: #FFFFFF;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    line-height: 1.3;
    display: block;
    padding: 0.5rem 0;
    white-space: nowrap;
}

.logo:hover {
    transform: scale(1.05);
    opacity: 0.9;
}

.logo span {
    font-size: 0.75rem;
    color: #FFFFFF;
    opacity: 0.9;
    font-weight: normal;
    display: block;
    margin-top: 0.3rem;
}

.nav-links {
    display: flex;
    list-style: none;
    align-items: flex-start;
    gap: 0rem;
    padding: 0;
    margin: 0;
}

.nav-links li {
    position: relative;
    padding: 0 0.8rem;
}

.nav-links a {
    text-decoration: none;
    color: #FFFFFF;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
    display: block;
    padding: 0.5rem 0;
}

.nav-links > li > a:hover,
.nav-links > li > a.active {
    color: #FFFFFF;
    opacity: 0.8;
}

/* Right side items (Login/Register/Language) */
.nav-right {
    display: flex;
    align-items: center;
    gap: 0;
    margin-left: auto;
    padding-left: 0;
}

.nav-right > li {
    padding: 0 0.8rem;
}

.nav-right a {
    text-decoration: none;
    color: #FFFFFF;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
    display: block;
    padding: 0.5rem 0;
}

.nav-right a:hover,
.nav-right a.active {
    color: #FFFFFF;
    opacity: 0.8;
}

/* Language selector */
header .language-select,
.nav-right .language-select {
    background: rgba(255, 255, 255, 0.1) !important;
    color: #FFFFFF !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    padding: 0.5rem 1rem !important;
    border-radius: 6px !important;
    font-size: 0.9rem !important;
    cursor: pointer;
    transition: all 0.3s ease;
    min-height: auto !important;
    height: auto;
    line-height: normal;
    margin: 0 !important;
}

.language-select:hover {
    background: rgba(255, 255, 255, 0.2);
}

.language-select option {
    background: var(--accent-primary);
    color: #FFFFFF;
}

/* 手機版樣式已移至 navbar-mobile.css */

/* User greeting */
.user-greeting {
    color: #FFFFFF;
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
}

/* Logout button */
.logout-btn {
    background: rgba(255, 255, 255, 0.1);
    color: #FFFFFF;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.logout-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Dropdown Menu Styles - 全螢幕展開式選單 */
.dropdown {
    position: relative;
}

.dropdown-menu {
    position: fixed;
    top: 90px;
    left: 0;
    width: 100vw;
    background: transparent;
    z-index: 999;
    padding: 2.2rem 0 2.8rem 0;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: left;
    overflow: hidden;
    transform: translateY(-20px);
}

/* Special positioning for single column dropdowns */
.dropdown-menu:has(.single-column) {
    width: auto;
    left: auto;
    right: auto;
    transform: translateX(calc(-2rem + 1rem));
}

.dropdown:hover > .dropdown-menu,
.dropdown:focus-within > .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Override transform for single column dropdowns on hover */
.dropdown:hover > .dropdown-menu:has(.single-column),
.dropdown:focus-within > .dropdown-menu:has(.single-column) {
    transform: translateX(calc(-2rem + 1rem));
}

.dropdown-menu .dropdown-content {
    display: block !important;
    justify-content: flex-start !important;
    align-items: flex-start !important;
    background: transparent;
}

.dropdown-menu .dropdown-inner {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 3rem;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 5rem;
    text-align: left;
    background: transparent;
}

/* For practice mode dropdown with fewer columns */
.dropdown-menu .dropdown-inner.single-column {
    grid-template-columns: 1fr;
    max-width: 250px;
    margin: 0;
    padding: 0 1rem;
}

.dropdown-column {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    background: transparent;
}

.dropdown-column-title {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 600;
    text-transform: none;
    letter-spacing: 0;
    margin-bottom: 1rem;
    padding-bottom: 0.2rem;
}

.dropdown-menu a {
    width: 100%;
    color: #FFFFFF !important;
    font-size: 1rem;
    padding: 0.45rem 0;
    text-decoration: none;
    transition: opacity 0.2s ease;
    border-radius: 0;
    display: block;
    margin: 0;
    text-align: left;
    position: relative;
    line-height: 1.5;
}

.dropdown-menu a:hover {
    background: transparent;
    color: #fff !important;
    opacity: 0.6;
}

/* Divider in dropdown - removed for cleaner look */

/* Special styling for column links */
.dropdown-column a {
    font-size: 1rem;
    padding: 0.45rem 0;
    font-weight: 400;
    color: #FFFFFF !important;
}

.dropdown-column a:hover {
    opacity: 0.6;
}

/* Mobile responsive for dropdown - 已移至 navbar-mobile.css */

/* Glass Overlay Effect */
.glass-overlay {
    position: fixed;
    top: 90px;
    left: 0;
    width: 100%;
    height: calc(100vh - 90px);
    pointer-events: none;
    z-index: 900;
    backdrop-filter: none;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: transparent;
    border-top: none;
}

header:has(.dropdown:hover) ~ .glass-overlay {
    backdrop-filter: blur(12px) saturate(1.1);
    background: linear-gradient(135deg, rgba(74, 105, 133, 0.08), rgba(74, 105, 133, 0.03));
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}
