/* === Design System Variables === */
:root {
    --color-white: rgba(255, 255, 255, 1);
    --color-black: rgba(0, 0, 0, 1);
    --color-bg-dark: rgba(31, 33, 33, 1);
    --color-bg-darker: rgba(31, 33, 33, 1);
    --color-gray-200: rgba(245, 245, 245, 1);
    --color-gray-300: rgba(167, 169, 169, 1);
    --color-gray-400: rgba(119, 124, 124, 1);
    --color-orange: rgba(255, 86, 48, 1);
    --color-orange-hover: rgba(229, 77, 43, 1);
    --color-teal: rgba(50, 184, 198, 1);
    --color-teal-hover: rgba(45, 166, 178, 1);
    
    --navbar-height: 64px;
    --font-family-base: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --space-8: 8px;
    --space-12: 12px;
    --space-16: 16px;
    --space-24: 24px;
    --space-32: 32px;
    --radius-base: 8px;
    --radius-lg: 12px;
    --radius-full: 9999px;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.08);
    --duration-fast: 150ms;
    --ease-standard: cubic-bezier(0.16, 1, 0.3, 1);
}

/* === Base Styles === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-family: var(--font-family-base);
    -webkit-font-smoothing: antialiased;
}

body {
    background-color: var(--color-bg-dark);
    color: var(--color-gray-200);
}

/* === Header === */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--navbar-height);
    background-color: var(--color-bg-darker);
    z-index: 1000;
}

.header-container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 var(--space-24);
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-24);
}

/* === Header Left === */
.header-left {
    display: flex;
    align-items: center;
    gap: var(--space-32);
    margin-left: 60px;  /* ← Здесь добавлен отступ 60px */
}

.header-brand {
    display: flex;
    align-items: center;
    gap: var(--space-12);
    text-decoration: none;
    color: var(--color-white);
    transition: opacity var(--duration-fast) var(--ease-standard);
}

.header-brand:hover {
    opacity: 0.9;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 4px;
}

.brand-logo svg {
    border-radius: 6px;
}

.brand-text {
    font-size: 20px;
    font-weight: 600;
    letter-spacing: -0.01em;
    white-space: nowrap;
}

/* === Header Center === */
.header-center {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
}

.gift-btn {
    background-color: var(--color-orange);
    color: var(--color-white);
    border: none;
    border-radius: var(--radius-base);
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--duration-fast) var(--ease-standard);
    display: flex;
    align-items: center;
    gap: var(--space-8);
    white-space: nowrap;
}

.gift-btn:hover {
    background-color: var(--color-orange-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 86, 48, 0.4);
}

.gift-btn:active {
    transform: translateY(0);
}

/* === Header Right === */
.header-right {
    display: flex;
    align-items: center;
    gap: var(--space-16);
    flex-shrink: 0;
}

.dropdown-btn {
    background: transparent;
    border: 1px solid rgba(119, 124, 124, 0.3);
    border-radius: var(--radius-base);
    color: var(--color-gray-200);
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--duration-fast) var(--ease-standard);
    display: flex;
    align-items: center;
    gap: var(--space-8);
    white-space: nowrap;
}

.dropdown-btn:hover {
    background: rgba(119, 124, 124, 0.1);
    border-color: rgba(119, 124, 124, 0.4);
}

.text-link {
    color: var(--color-gray-200);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color var(--duration-fast) var(--ease-standard);
    white-space: nowrap;
}

.text-link:hover {
    color: var(--color-white);
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    background: transparent;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform var(--duration-fast) var(--ease-standard);
    padding: 0;
}

.user-avatar:hover {
    transform: scale(1.05);
}

/* === Mobile Menu Button === */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--space-8);
}

.mobile-menu-btn span {
    width: 24px;
    height: 2px;
    background-color: var(--color-gray-200);
    transition: all var(--duration-fast) var(--ease-standard);
}

.mobile-menu-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* === Mobile Navigation === */
.mobile-nav {
    display: none;
    position: fixed;
    top: var(--navbar-height);
    left: 0;
    right: 0;
    background-color: var(--color-bg-darker);
    border-bottom: 1px solid rgba(119, 124, 124, 0.2);
    padding: var(--space-16);
    flex-direction: column;
    gap: var(--space-12);
    box-shadow: var(--shadow-sm);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s var(--ease-standard);
}

.mobile-nav.active {
    display: flex;
    max-height: 400px;
}

.mobile-nav-item {
    padding: var(--space-12);
    color: var(--color-gray-200);
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    border-radius: var(--radius-base);
    transition: background var(--duration-fast) var(--ease-standard);
    display: flex;
    align-items: center;
    gap: var(--space-8);
    background: transparent;
    border: none;
    cursor: pointer;
    width: 100%;
    text-align: left;
}

.mobile-nav-item:hover {
    background: rgba(119, 124, 124, 0.1);
}

.gift-btn-mobile {
    background-color: var(--color-orange);
    color: var(--color-white);
    justify-content: center;
}

.gift-btn-mobile:hover {
    background-color: var(--color-orange-hover);
}

/* === Responsive === */
@media (max-width: 968px) {
    .header-center {
        display: none;
    }
    
    .text-link {
        display: none;
    }
}

@media (max-width: 768px) {
    .header-container {
        padding: 0 var(--space-16);
    }

    .dropdown-btn {
        display: none;
    }

    .mobile-menu-btn {
        display: flex;
    }

    .brand-text {
        font-size: 18px;
    }

    .user-avatar {
        width: 36px;
        height: 36px;
    }
}

@media (max-width: 480px) {
    .brand-logo svg {
        width: 28px;
        height: 28px;
    }
    
    .brand-text {
        font-size: 16px;
    }
}

/* === Demo Content === */
.demo-content {
    max-width: 1440px;
    margin: 0 auto;
    padding: 60px var(--space-24);
}

.demo-content h1 {
    font-size: 48px;
    font-weight: 600;
    margin-bottom: var(--space-24);
    color: var(--color-white);
}

.demo-content p {
    font-size: 18px;
    line-height: 1.6;
    color: var(--color-gray-300);
    margin-bottom: var(--space-16);
}

@media (max-width: 768px) {
    .demo-content h1 {
        font-size: 32px;
    }
    
    .demo-content p {
        font-size: 16px;
    }
}

.notif-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 300px;
    background: #262828;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
    z-index: 2000;
    overflow: hidden;
}
.notif-dropdown.open { display: block; }
.notif-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    font-size: 14px;
    font-weight: 600;
    color: #e0e0e0;
}
.notif-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    font-size: 13px;
    color: #ccc;
}
.notif-item small { color: #666; font-size: 11px; }
.notif-item:hover { background: rgba(255,255,255,0.05); }
.notif-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    background: #FF5630;
    color: white;
    font-size: 10px;
    font-weight: 700;
    border-radius: 50%;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Позиционирование относительно кнопки */
.notif-btn { position: relative; }
/* Поиск */
.header-search {
    position: relative;
    display: flex;
    align-items: center;
}
.search-input {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 8px;
    padding: 7px 12px 7px 34px;
    color: var(--color-gray-200);
    font-size: 13px;
    width: 200px;
    transition: all 0.2s;
}
.search-input:focus {
    outline: none;
    width: 260px;
    background: rgba(255,255,255,0.12);
}
.search-input::placeholder { color: var(--color-gray-400); }
.search-icon {
    position: absolute;
    left: 10px;
    color: var(--color-gray-400);
    pointer-events: none;
}

/* Уведомления */
.notif-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--color-gray-200);
    position: relative;
    padding: 6px;
    border-radius: 8px;
    transition: background 0.2s;
}
.notif-btn:hover { background: rgba(255,255,255,0.08); }
.notif-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    color: #FF5630;
    font-size: 10px;
    line-height: 1;
}

/* User menu */
.user-menu { position: relative; }
.user-info-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 8px;
    padding: 6px 12px;
    cursor: pointer;
    color: var(--color-gray-200);
    transition: all 0.2s;
}
.user-info-btn:hover { background: rgba(255,255,255,0.08); }
.user-avatar-circle {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #32B8C6;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
}
.user-name-text {
    font-size: 14px;
    font-weight: 500;
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Dropdown */
.user-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: #262828;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 10px;
    min-width: 180px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
    z-index: 2000;
    overflow: hidden;
}
.user-dropdown.open { display: block; }
.dropdown-item {
    display: block;
    padding: 10px 16px;
    color: var(--color-gray-200);
    text-decoration: none;
    font-size: 14px;
    transition: background 0.15s;
}
.dropdown-item:hover { background: rgba(255,255,255,0.07); }
.dropdown-item-danger { color: #ff6b6b; }
.dropdown-item-danger:hover { background: rgba(255,107,107,0.1); }
.dropdown-divider {
    height: 1px;
    background: rgba(255,255,255,0.08);
    margin: 4px 0;
}

/* Светлая тема */
.light-theme .search-input {
    background: rgba(0,0,0,0.05);
    border-color: #ddd;
    color: #1f2121;
}
.light-theme .user-info-btn {
    border-color: #ddd;
}
.light-theme .user-dropdown {
    background: #ffffff;
    border-color: #e0e0e0;
}
.light-theme .dropdown-item { color: #1f2121; }
