:root {
    --bg-color: #FAF4F2;
    --header-bg: #447d94;
    --text-primary: #1C1C1E;
    --text-secondary: #6E6E73;
    --accent: #264653;
    --hover-accent: #fade99;
    --icon-color: #1C1C1E;
    --sub-menu: #2a657c;
}

.dark-mode {
    --bg-color: #3B4658;
    --header-bg: #2C2C2E;
    --text-primary: #FAF6F2;
    --text-secondary: #6E6E73;
    --accent: #2a2b3a;
    --hover-accent: #E9C46A;
    --icon-color: #FAF6F2;
    --sub-menu: #1C1C1E;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    transition: background-color 0.3s, color 0.3s;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem 2rem;
    background-color: var(--header-bg);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    height: 80px;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
}

img{
    width: 100%;
    height: 100%;
}

nav {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}
.nav-link {
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 500;
    padding: 0.5rem 0;
    position: relative;
    white-space: nowrap;
    transition: color 0.3s;
}

.nav-link:hover {
    color: var(--hover-accent);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--hover-accent);
    transition: width 0.3s;
}

.nav-link:hover::after {
    width: 100%;
}

#dark-mode-toggle {
    cursor: pointer;
    font-size: 1.4rem;
    color: var(--icon-color);
    display: flex;
    align-items: center;
    transition: transform 0.3s, color 0.3s;
}

#dark-mode-toggle:hover {
    color: var(--hover-accent);
    transform: rotate(15deg);
}

.search-container {
    display: flex;
    align-items: center;
    position: relative;
}

.search-icon {
    cursor: pointer;
    font-size: 1.4rem;
    color: var(--icon-color);
    display: flex;
    align-items: center;
    transition: all 0.3s;
}

.search-icon:hover {
    color: var(--hover-accent);
    transform: scale(1.1);
}

.search-icon i {
    transition: transform 0.3s;
}

.search-container.active .search-icon i {
    transform: rotate(90deg);
}

.search-input-container {
    width: 0;
    overflow: hidden;
    transition: width 0.4s ease;
    margin-left: 0;
}

.search-container.active .search-input-container {
    width: 345px;
    margin-left: 0.5rem;
}

.search-input {
    width: 100%;
    padding: 8px 15px;
    border: none;
    background: transparent;
    outline: none;
    color: var(--text-primary);
    font-size: 1rem;
    border-bottom: 1px solid var(--bg-color);
    transition: border-color 0.3s;
}

.search-input::placeholder {
    color: var(--text-secondary);
    opacity: 0.8;
}

.search-input:focus {
    border-bottom-color: var(--hover-accent);
}

.config-link {
    display: flex;
    align-items: center;
    font-size: 1.4rem;
    color: var(--icon-color);
    transition: transform 0.3s, color 0.3s;
}

.config-link:hover {
    color: var(--hover-accent);
    transform: rotate(30deg);
}


.user-replace {
    top: 0.2rem;
    right: 2%;
    width: 58px;      
    height: 58px;      
    border-radius: 50%;
    overflow: hidden;   
    font-size: 1.5vmin;
    transition: .5s;
}

.user-replace img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
}

.sub-menu-wrap {
    position: absolute;
    top: 5.631rem;
    right: 0.2%;
    max-height: 0vmin;
    height: fit-content;
    width: 18rem;
    overflow: hidden;
    transition: max-height 0.1s;
    border-radius: 0px 0px 10px 10px;
    background-color: var(--sub-menu);
    z-index: 900;
}
  
.sub-menu-wrap.active {
    max-height: 40rem;
    overflow: show; 
    background-color: var(--sub-menu);
    z-index: 900;
}
  
.sub-menu {
    padding: 0 16px;
}
  
.user-info {
    padding: 16px 12px;
    border-bottom: 1px solid #333;
}
  
.user-info h2 {
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    margin: 0 0 4px 0;
}

.user-info h3 {
    font-size: 14px;
    color: #b3b3b3;
    margin: 0;
    font-weight: 500;
}
  
.menu-items {
    display: flex;
    flex-direction: column;
    padding: 8px 0;
}

.menu-items i{
    font-size: 1.6rem;
}

.menu-items p{
    padding-left: 4%;
    font-size: 1.1rem;
}

.submenu-link {
    display: flex;
    align-items: center;
    padding: 12px 8px;
    text-decoration: none;
    color: #fff;
    border-radius: 6px;
    transition: background-color 1.6s;
}
  
.submenu-link:hover {
    background-color: #333;
}
  
.menu-icon {
    width: 24px;
    height: 24px;
    fill: #fff;
    margin-right: 12px;
}
  
.arrow-icon {
    width: 20px;
    height: 20px;
    fill: #b3b3b3;
    margin-left: auto;
}
  
.submenu-link span {
    font-size: 15px;
    font-weight: 500;
}
  
.divider {
    height: 1px;
    background-color: #333;
    margin: 8px 0;
}
  
.recent-items {
    padding: 8px 0;
}
  
.section-title {
    color: #b3b3b3;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 8px 8px;
    font-weight: 600;
}
  
.recent-link {
    display: block;
    padding: 10px 8px;
    color: #fff;
    text-decoration: none;
    font-size: 14px;
    border-radius: 6px;
    transition: background-color 0.2s;
}
  
.recent-link:hover {
    background-color: #333;
    color: #fff;
}
