:root {
    /* Цветовые схемы */
    --color-1: #4285F4;
    --color-2: #EA4335;
    --color-3: #FBBC05;
    --color-4: #34A853;
    --color-5: #9b59b6;
    
    /* Темная тема по умолчанию */
    --bg-primary: #121212;
    --bg-secondary: #1e1e1e;
    --text-primary: #ffffff;
    --text-secondary: #cccccc;
    --border-color: #333333;
}

[active="color_1"] {
    --color-active: #4285F4;
}
[active="color_2"] {
    --color-active: #EA4335;
}
[active="color_3"] {
    --color-active: #FBBC05;
}
[active="color_4"] {
    --color-active: #34A853;
}
[active="color_5"] {
    --color-active: #9b59b6;
}
[theme="white"] {
    --bg-primary: #ffffff;
    --bg-secondary: #f5f5f5;
    --text-primary: #333333;
    --text-secondary: #666666;
    --border-color: #e0e0e0;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    transition: background-color 0.3s, color 0.3s;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    overflow-x: hidden;
}

/* Контейнеры и общие стили */
.container {
    display: flex;
    min-height: 100vh;
}

/* Стили для боковой панели */
.sidebar {
    width: 280px;
    background-color: var(--bg-secondary);
    padding: 20px;
    border-right: 1px solid var(--border-color);
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    z-index: 100;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: stretch;
}

.header-box-logo {
    height: 75px;
    position: relative;
}
img.header-logo {
    width: 100%;
    padding: 15px;
    z-index: 2;
    position: relative;
}
img.header-logo.srcB {
    position: absolute;
    top: 0;
    left: 0;
}
html[theme="white"] img.header-logo.srcW {
    opacity: 0;
}
html[theme="dark"] img.header-logo.srcB {
    opacity: 0;
}
.box-bg-logo.l-b-bg, .box-bg-logo.r-t-bg {
    width: 30px;
    height: 6px;
}

.box-bg-logo {
    background: var(--color-active);
    position: absolute;
    -moz-transition: all .5s ease-out;
    -o-transition: all .5s ease-out;
    -webkit-transition: all .5s ease-out;
    transition: all .5s ease-out;
}

.box-bg-logo.l-t-bg, .box-bg-logo.r-b-bg {
    width: 6px;
    height: 30px;
}

.box-bg-logo.r-t-bg {
    top: 0;
    right: 0;
}

.box-bg-logo.r-b-bg {
    right: 0;
    top: 0;
}

.box-bg-logo.l-t-bg {
    left: 0;
    bottom: 0;
}

.box-bg-logo.l-b-bg {
    left: 0;
    bottom: 0;
}

.header-box-logo:hover .r-b-bg {
    top: calc(100% - 30px);
}

.header-box-logo:hover .r-t-bg {
    right: calc(100% - 30px);
}

.header-box-logo:hover .l-t-bg {
    bottom: calc(100% - 30px);
}

.header-box-logo:hover .l-b-bg {
    left: calc(100% - 30px);
}

.nav-menu {
    list-style: none;
    margin-bottom: 40px;
}

.nav-menu li {
    margin-bottom: 10px;
}

.nav-menu a {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    text-decoration: none;
    color: var(--text-secondary);
    border-radius: 8px;
    transition: all 0.3s;
}

.nav-menu a:hover {
    background-color: rgba(128, 128, 128, 0.1);
}

.nav-menu a.active {
    color: var(--text-primary);
    font-weight: 600;
}

.nav-menu a i {
    margin-right: 10px;
    font-size: 1.2rem;
    width: 24px;
    text-align: center;
}

/* Акцентный цвет для активных элементов */
.nav-menu a.active,
.btn_theme.active {
    color: var(--color-active);
    border-bottom: 2px solid var(--color-active);
}

/* Основное содержимое */
.main-content {
    flex: 1;
    margin-left: 280px;
    padding: 30px;
}

.page {
    animation: fadeIn 0.5s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Стили для главной страницы */
.hero {
    text-align: center;
    padding: 60px 0;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 20px;
}

.hero span {
    font-weight: 700;
}

.hero span {
    color: var(--color-active);
}

.hero p {
    font-size: 1.2rem;
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.6;
    color: var(--text-secondary);
}

/* Стили для страницы "О нас" */
.about-content {
    max-width: 900px;
    margin: 0 auto;
}

.about-content h2 {
    margin-bottom: 20px;
    font-size: 2.2rem;
}

.about-content p, .about-content ul {
    margin-bottom: 20px;
    line-height: 1.6;
    color: var(--text-secondary);
}

.about-content ul {
    padding-left: 20px;
}

.about-content li {
    margin-bottom: 10px;
}

/* Стили для страницы проектов */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.project-card {
    background-color: var(--bg-secondary);
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.3s;
}

.project-card:hover {
    transform: translateY(-5px);
}

.project-img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.project-info {
    padding: 20px;
}

.project-info h3 {
    margin-bottom: 10px;
    font-size: 1.3rem;
}

.project-info p {
    color: var(--text-secondary);
    margin-bottom: 15px;
    line-height: 1.5;
}

.project-link {
    display: inline-block;
    padding: 8px 15px;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 500;
}

.project-link {
    background-color: var(--color-active);
    color: white;
}

/* Стили для страницы контактов */
.contact-info {
    max-width: 700px;
    margin: 0 auto;
}

.contact-card {
    background-color: var(--bg-secondary);
    border-radius: 10px;
    padding: 30px;
    margin-bottom: 30px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.contact-item {
    display: flex;
    align-items: center;
    width: 100%;
    background: var(--bg-primary);
    border-radius: 15px;
    padding: 10px 20px;
    gap: 15px;
}
.contact-item i.fa-memo-circle-info {
    padding-left: 6px;
}
.contact-item i {
    font-size: 1.5rem;
    width: 45px;
    height: 47px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: var(--color-active);
    border-radius: 25px;
}

.contact-item i {
    color: white;
}

.contact-details span {
    display: block;
}

.contact-details span:first-child {
    font-weight: 600;
    margin-bottom: 5px;
}

/* Стили для панели темы (новая система) */
theme {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
}

.btns_theme {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.btn_theme {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    transition: all 0.3s;
}

.btn_theme:hover {
    transform: translateY(-3px);
}

.theme-toggle {
    position: relative;
    overflow: hidden;
}

.theme-toggle i {
    transition: transform 0.3s, opacity 0.3s;
}

.theme-toggle .fa-sun {
    position: absolute;
    transform: rotate(180deg);
    opacity: 0;
}

[theme="white"] .theme-toggle .fa-moon {
    transform: rotate(180deg);
    opacity: 0;
}

[theme="white"] .theme-toggle .fa-sun {
    transform: rotate(0deg);
    opacity: 1;
}

.box_theme-co {
    position: absolute;
    bottom: 60px;
    right: 0;
    background-color: var(--bg-secondary);
    border-radius: 10px;
    padding: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s;
}

.box_theme-co[status="open"] {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.box_theme h4 {
    margin-bottom: 10px;
    text-align: center;
    color: var(--text-primary);
}

.box_theme-list {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.box_theme-item {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    transition: transform 0.2s;
}

.box_theme-item:hover {
    transform: scale(1.1);
}

.box_theme-item[color="1"] {
    background-color: var(--color-1);
}

.box_theme-item[color="2"] {
    background-color: var(--color-2);
}

.box_theme-item[color="3"] {
    background-color: var(--color-3);
}

.box_theme-item[color="4"] {
    background-color: var(--color-4);
}

.box_theme-item[color="5"] {
    background-color: var(--color-5);
}

/* Адаптивность */
@media (max-width: 992px) {
    .sidebar {
        width: 230px;
    }
    .main-content {
        margin-left: 230px;
    }
}

@media (max-width: 768px) {
    .container {
        flex-direction: column;
    }
    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }
    .main-content {
        margin-left: 0;
    }
    .hero h1 {
        font-size: 2.2rem;
    }
    
    theme {
        bottom: 10px;
        right: 10px;
    }
    
    .btn_theme {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
}

/* Мобильное меню */
.mobile-menu-btn {
    display: none;
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1000;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    width: 45px;
    height: 45px;
    border-radius: 8px;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

@media (max-width: 768px) {
    .mobile-menu-btn {
        display: flex;
    }
    .sidebar {
        position: fixed;
        left: -100%;
        transition: left 0.3s;
        width: 280px;
        height: 100vh;
    }
    .sidebar.open {
        left: 0;
    }
}
.loading, .error {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 300px;
    font-size: 1.5rem;
    color: var(--text-secondary);
}

.error {
    color: #e74c3c;
}