/* ========== HEADER (Glassmorphism) ========== */

.top-bar {
    display: flex;
    align-items: center;
    padding: 10px 16px 10px 32px;
    margin: 20px auto;
    max-width: 1200px;
    border-radius: 999px;
    position: sticky;
    top: 20px;
    z-index: 50;

    background: rgba(220, 235, 225, 0.45);
    backdrop-filter: blur(24px) saturate(1.8);
    -webkit-backdrop-filter: blur(24px) saturate(1.8);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.04), inset 0 0 0 1px rgba(16, 185, 129, 0.12);

    transition: background 0.3s ease, box-shadow 0.3s ease;
}

.menu {
    display: flex;
    gap: 8px;
    margin: 0 auto;
}

.menu-item {
    cursor: pointer;
    padding: 10px 20px;
    border-radius: 999px;
    position: relative;
    font-weight: 500;
    transition: background 0.2s ease, color 0.2s ease;
}

.menu-item:hover,
.menu-item.active {
    color: #059669;
    background: rgba(16, 185, 129, 0.12);
}

/* ========== DROPDOWN ========== */

.dropdown-parent {
    position: relative;
}

/* first level */
.dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 12px;

    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px) saturate(1.3);
    -webkit-backdrop-filter: blur(20px) saturate(1.3);
    border-radius: 16px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.1);
    padding: 8px 0;
    min-width: 220px;

    z-index: 100;
}

.dropdown-parent:hover>.dropdown {
    display: block;
}

/* hover bridge */
.dropdown-parent::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    height: 14px;
    pointer-events: auto;
}

/* items */
.dropdown-item {
    padding: 8px 14px;
    cursor: pointer;
    white-space: nowrap;
}

.dropdown-item:hover {
    background: rgba(16, 185, 129, 0.08);
}

/* second level (tools) */
.dropdown-item.has-children {
    position: relative;
}

.dropdown-item.has-children>.dropdown {
    display: none;
    top: 0;
    left: 100%;
    margin-left: 8px;
    z-index: 200;
}

.dropdown-item.has-children:hover>.dropdown {
    display: block;
}

/* prevent auto-show */
.dropdown-parent:hover .dropdown .dropdown {
    display: none;
}

/* ========== BREADCRUMB ========== */

.breadcrumb {
    margin-bottom: 12px;
    color: #3b7a5e;
    cursor: pointer;
    display: inline-block;
}

/* ========== CONTROLS ROW ========== */

.controls-row {
    display: flex;
    justify-content: flex-end;
    max-width: 720px;
    margin: 0 auto 24px;
}

/* ===== LOGO: AbsTools ===== */

.logo {
    font-family: "Manrope", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 22px;
    letter-spacing: -0.02em;
    cursor: pointer;
    user-select: none;

    display: flex;
    align-items: center;
    gap: 8px;

    transition: transform 0.2s ease, filter 0.2s ease;
}

/* Abs */
.logo-main {
    font-weight: 700;
    color: #2d6a4f;
}

/* Tools */
.logo-sub {
    font-weight: 500;
    color: #34d399;
    margin-left: 1px;
}

/* hover */
.logo:hover {
    transform: scale(1.02);
    filter: saturate(1.1);
}

.logo-icon {
    width: 44px;
    height: 44px;
    object-fit: contain;
    flex-shrink: 0;

    transition:
        transform 0.2s ease,
        opacity 0.2s ease;
}

/* hover sync with text */
.logo:hover .logo-icon {
    transform: scale(1.05);
}

.logo-text {
    display: inline-flex;
    align-items: center;
}

/* ===== DARK MODE: Header ===== */

body.dark .top-bar {
    background: rgba(18, 23, 20, 0.5);
    backdrop-filter: blur(24px) saturate(1.6);
    -webkit-backdrop-filter: blur(24px) saturate(1.6);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4), inset 0 0 0 1px rgba(52, 211, 153, 0.12);
}

body.dark .menu-item:hover,
body.dark .menu-item.active {
    background: rgba(52, 211, 153, 0.12);
    color: #34d399;
}

body.dark .dropdown {
    background: rgba(18, 23, 20, 0.9);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(52, 211, 153, 0.08);
    color: #e2ebe6;
}

body.dark .dropdown-item:hover {
    background: rgba(52, 211, 153, 0.08);
}

body.dark .logo-main {
    color: #6ee7b7;
}

body.dark .logo-sub {
    color: #a7f3d0;
}

body.dark .logo-icon {
    content: url("../images/logo-dark.png");
}

body.dark .breadcrumb {
    color: #e5e7eb;
    opacity: 0.7;
}

body.dark .breadcrumb:hover {
    opacity: 1;
    text-decoration: underline;
}
