/* ========================================
   CSS ПЕРЕМЕННЫЕ ДЛЯ ТЕМ
======================================== */

:root[data-theme="dark"] {
    --bg-primary: #0f0f0f;
    --bg-secondary: rgba(15, 15, 15, 0.95);
    --bg-card: rgba(220, 38, 38, 0.06);
    --bg-card-hover: rgba(220, 38, 38, 0.12);
    --text-primary: #e8e8e8;
    --text-secondary: #b8b8b8;
    --accent-primary: #dc2626;
    --accent-secondary: #b91c1c;
    --border-color: rgba(220, 38, 38, 0.2);
    --shadow-color: rgba(220, 38, 38, 0.15);
    --gradient-start: rgba(220, 38, 38, 0.08);
    --gradient-end: rgba(185, 28, 28, 0.08);
}

:root[data-theme="light"] {
    --bg-primary: #fafafa;
    --bg-secondary: rgba(255, 255, 255, 0.95);
    --bg-card: rgba(220, 38, 38, 0.04);
    --bg-card-hover: rgba(220, 38, 38, 0.08);
    --text-primary: #2a2a2a;
    --text-secondary: #5a5a5a;
    --accent-primary: #dc2626;
    --accent-secondary: #b91c1c;
    --border-color: rgba(220, 38, 38, 0.15);
    --shadow-color: rgba(220, 38, 38, 0.1);
    --gradient-start: rgba(220, 38, 38, 0.05);
    --gradient-end: rgba(185, 28, 28, 0.05);
}

/* ========================================
   БАЗОВЫЕ СТИЛИ
======================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    width: 100%;
    overflow-x: hidden;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
    width: 100%;
    position: relative;
    transition: background 0.5s ease, color 0.5s ease;
}

/* ========================================
   PARALLAX ФОН
======================================== */

.parallax-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    pointer-events: none;
}

.parallax-layer {
    position: absolute;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    will-change: transform;
}

.parallax-layer-1 {
    background: radial-gradient(circle at 20% 50%, var(--gradient-start) 0%, transparent 50%);
    animation: pulse 8s ease-in-out infinite;
}

.parallax-layer-2 {
    background: radial-gradient(circle at 80% 80%, var(--gradient-end) 0%, transparent 50%);
    animation: pulse 8s ease-in-out infinite reverse;
}

@keyframes pulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 0.8; }
}

/* ========================================
   ПЕРЕКЛЮЧАТЕЛЬ ТЕМ
======================================== */

.theme-switcher {
    position: fixed;
    top: 100px;
    right: 20px;
    z-index: 9999;
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: 15px;
    padding: 15px;
    box-shadow: 0 10px 30px var(--shadow-color);
    transition: all 0.3s ease;
}

.theme-switcher:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px var(--shadow-color);
}

.theme-switcher-title {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 10px;
    text-align: center;
    font-weight: bold;
}

.theme-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.theme-btn {
    padding: 10px 15px;
    border: 2px solid var(--border-color);
    background: var(--bg-card);
    color: var(--text-primary);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 12px;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.theme-btn:hover {
    background: var(--bg-card-hover);
    transform: scale(1.05);
}

.theme-btn.active {
    background: var(--accent-primary);
    color: white;
    border-color: var(--accent-primary);
}

.theme-icon {
    font-size: 16px;
}

/* ========================================
   ШАПКА САЙТА
======================================== */

header {
    background: var(--bg-secondary);
    padding: 20px 0;
    box-shadow: 0 4px 20px var(--shadow-color);
    border-bottom: 2px solid var(--accent-primary);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    transition: all 0.3s ease;
}

header.hidden {
    transform: translateY(-100%);
}

header:hover {
    box-shadow: 0 6px 30px var(--shadow-color);
}

nav {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 40px;
}

/* ========================================
   ЛОГОТИП С SVG СЕРДЦЕМ
======================================== */

.logo {
    font-size: 28px;
    font-weight: bold;
    color: var(--accent-primary);
    text-decoration: none;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.heart-icon {
    width: 28px;
    height: 28px;
    color: var(--accent-primary);
    filter: drop-shadow(0 0 8px var(--accent-primary));
    transition: all 0.3s ease;
    animation: heartbeat-logo 1.5s ease-in-out infinite;
}

@keyframes heartbeat-logo {
    0%, 100% { 
        transform: scale(1); 
    }
    10%, 30% { 
        transform: scale(1.1); 
    }
    20%, 40% { 
        transform: scale(1); 
    }
}

.logo:hover .heart-icon {
    transform: scale(1.2);
    filter: drop-shadow(0 0 15px var(--accent-primary));
}

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

/* Убираем старую анимацию glow-logo */
@keyframes glow-logo {
    0%, 100% { filter: drop-shadow(0 0 10px var(--accent-primary)); }
    50% { filter: drop-shadow(0 0 20px var(--accent-primary)); }
}

/* ========================================
   НАВИГАЦИЯ
======================================== */

nav ul {
    display: flex;
    gap: 40px;
    list-style: none;
}

nav ul li a {
    color: var(--text-primary);
    text-decoration: none;
    font-size: 18px;
    transition: all 0.3s ease;
    position: relative;
    padding: 5px 0;
}

nav ul li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-primary);
    transition: width 0.3s ease;
}

nav ul li a:hover {
    color: var(--accent-primary);
}

nav ul li a:hover::after,
nav ul li a.active::after {
    width: 100%;
}

nav ul li a.active {
    color: var(--accent-primary);
}

/* ========================================
   МИНИМАЛИСТИЧНЫЙ ПЕРЕКЛЮЧАТЕЛЬ ТЕМ
======================================== */

.theme-toggle-header {
    display: flex;
    gap: 6px;
    align-items: center;
    background: transparent;
    padding: 0;
}

.theme-toggle-btn {
    width: 36px;
    height: 36px;
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    color: var(--text-secondary);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.theme-toggle-btn svg {
    width: 18px;
    height: 18px;
    transition: all 0.3s ease;
}

.theme-toggle-btn:hover {
    background: var(--bg-card-hover);
    border-color: var(--accent-primary);
    transform: scale(1.05);
}

.theme-toggle-btn.active {
    background: var(--accent-primary);
    color: white;
    border-color: var(--accent-primary);
}

.theme-toggle-btn.active svg {
    filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.5));
}

.theme-toggle-btn:active {
    transform: scale(0.95);
}

/* Анимация иконок */
.sun-icon {
    animation: rotate-sun 20s linear infinite;
}

@keyframes rotate-sun {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.moon-icon {
    animation: moon-glow 3s ease-in-out infinite;
}

@keyframes moon-glow {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.85; }
}

/* ========================================
   СЕКЦИЯ КОМАНДЫ
======================================== */

.team-section {
    padding: 140px 40px 100px;
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.team-header {
    text-align: center;
    margin-bottom: 70px;
}

.team-header h1 {
    font-size: 56px;
    color: var(--accent-primary);
    text-shadow: 0 0 30px var(--shadow-color);
    margin-bottom: 20px;
    animation: glow-title 2s ease-in-out infinite;
}

@keyframes glow-title {
    0%, 100% { text-shadow: 0 0 20px var(--accent-primary), 0 0 40px var(--shadow-color); }
    50% { text-shadow: 0 0 30px var(--accent-primary), 0 0 60px var(--shadow-color); }
}

.team-header p {
    font-size: 20px;
    color: var(--text-secondary);
    line-height: 1.8;
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
}

.team-member {
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: 20px;
    padding: 40px 30px;
    text-align: center;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
    opacity: 0;
    animation: fadeInUp 0.6s ease forwards;
}

.team-member:nth-child(1) { animation-delay: 0.1s; }
.team-member:nth-child(2) { animation-delay: 0.2s; }
.team-member:nth-child(3) { animation-delay: 0.3s; }
.team-member:nth-child(4) { animation-delay: 0.4s; }
.team-member:nth-child(5) { animation-delay: 0.5s; }
.team-member:nth-child(6) { animation-delay: 0.6s; }

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.team-member::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, var(--bg-card-hover), transparent);
    transition: left 0.5s ease;
}

.team-member:hover::before {
    left: 100%;
}

.team-member:hover {
    transform: translateY(-10px);
    border-color: var(--accent-primary);
    box-shadow: 0 20px 50px var(--shadow-color);
}

.team-avatar {
    width: 120px;
    height: 120px;
    margin: 0 auto 25px;
    border-radius: 50%;
    border: 4px solid var(--accent-primary);
    overflow: hidden;
    position: relative;
    background: var(--bg-card-hover);
    transition: all 0.3s ease;
}

.team-member:hover .team-avatar {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 0 30px var(--accent-primary);
}

.team-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.team-avatar:not(:has(img))::before {
    content: '👤';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 60px;
    opacity: 0.5;
}

.team-name {
    font-size: 24px;
    font-weight: bold;
    color: var(--accent-primary);
    margin-bottom: 10px;
}

.team-role {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 20px;
    font-weight: 600;
}

.team-description {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 20px;
}

.team-socials {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
}

.team-social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-card-hover);
    border: 2px solid var(--border-color);
    color: var(--accent-primary);
    text-decoration: none;
    font-size: 18px;
    transition: all 0.3s ease;
}

.team-social-link:hover {
    background: var(--accent-primary);
    color: white;
    transform: scale(1.2) rotate(10deg);
    box-shadow: 0 5px 15px var(--shadow-color);
}

/* ========================================
   ТУЛТИП ДЛЯ MINECRAFT НИКА
======================================== */

.minecraft-link {
    position: relative;
}

.minecraft-link::before {
    content: attr(data-minecraft);
    position: absolute;
    bottom: 120%;
    left: 50%;
    transform: translateX(-50%) translateY(-5px);
    background: var(--accent-primary);
    color: white;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: bold;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
    z-index: 1000;
    box-shadow: 0 5px 15px var(--shadow-color);
}

.minecraft-link::after {
    content: '';
    position: absolute;
    bottom: 105%;
    left: 50%;
    transform: translateX(-50%) translateY(3px);
    border: 6px solid transparent;
    border-top-color: var(--accent-primary);
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
    z-index: 999;
}

.minecraft-link:hover::before {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    animation: tooltipBounce 0.4s ease;
}

.minecraft-link:hover::after {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Анимация появления тултипа */
@keyframes tooltipBounce {
    0% {
        transform: translateX(-50%) translateY(-5px);
        opacity: 0;
    }
    50% {
        transform: translateX(-50%) translateY(2px);
    }
    100% {
        transform: translateX(-50%) translateY(0);
        opacity: 1;
    }
}

/* Активный класс для мобильных */
.minecraft-link.tooltip-active::before,
.minecraft-link.tooltip-active::after {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ========================================
   ФУТЕР
======================================== */

footer {
    background: var(--bg-secondary);
    padding: 60px 40px 30px;
    text-align: center;
    border-top: 2px solid var(--accent-primary);
    position: relative;
    z-index: 1;
    width: 100%;
    margin-top: 100px;
}

.footer-logo {
    font-size: 20px;
    color: var(--accent-primary);
    margin-bottom: 20px;
    font-weight: bold;
}

.footer-copyright,
.footer-disclaimer {
    color: var(--text-secondary);
    margin-bottom: 10px;
    font-size: 15px;
}

.footer-info {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.footer-info p {
    font-size: 14px;
    color: var(--text-secondary);
}

.footer-info a {
    color: var(--accent-primary);
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
}

.footer-info a:hover {
    color: var(--accent-secondary);
    text-decoration: underline;
}

/* ========================================
   УВЕДОМЛЕНИЯ
======================================== */

.notification {
    position: fixed;
    bottom: 40px;
    right: 40px;
    background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
    color: white;
    padding: 20px 35px;
    border-radius: 12px;
    box-shadow: 0 10px 40px var(--shadow-color);
    transform: translateX(500px);
    transition: transform 0.4s ease;
    z-index: 10000;
    font-size: 16px;
    font-weight: bold;
    max-width: calc(100vw - 80px);
    word-wrap: break-word;
}

.notification.show {
    transform: translateX(0);
}

/* ========================================
   СКРОЛЛБАР
======================================== */

::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
    border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--accent-secondary) 0%, var(--accent-primary) 100%);
}

/* ========================================
   ВЫДЕЛЕНИЕ ТЕКСТА
======================================== */

::selection {
    background: var(--bg-card-hover);
    color: var(--text-primary);
}

/* ========================================
   АДАПТИВ: ПЛАНШЕТЫ (768px - 1024px)
======================================== */

@media (max-width: 1024px) {
    nav {
        padding: 0 30px;
    }

    .team-section {
        padding: 120px 30px 80px;
    }

    .team-header h1 {
        font-size: 48px;
    }

    .team-header p {
        font-size: 18px;
    }

    .team-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }

    .theme-switcher {
        right: 15px;
        top: 90px;
        padding: 12px;
    }

    .theme-switcher-title {
        font-size: 11px;
    }

    .theme-btn {
        padding: 8px 12px;
        font-size: 11px;
    }
}
@media (max-width: 1024px) {
    nav {
        padding: 0 30px;
    }

    .logo {
        font-size: 26px;
    }
    
    .heart-icon {
        width: 26px;
        height: 26px;
    }
    
    .theme-toggle-btn {
        width: 34px;
        height: 34px;
    }
    
    .theme-toggle-btn svg {
        width: 17px;
        height: 17px;
    }
}
@media (max-width: 768px) {
    nav {
        flex-direction: column;
        gap: 15px;
        padding: 15px 20px;
        position: relative;
    }

    .logo {
        font-size: 24px;
    }
    
    .heart-icon {
        width: 24px;
        height: 24px;
    }

    nav ul {
        gap: 15px;
        flex-wrap: wrap;
        justify-content: center;
    }

    nav ul li a {
        font-size: 15px;
        padding: 8px 12px;
    }
    
    /* Переключатель в правом верхнем углу на мобильных */
    .theme-toggle-header {
        position: absolute;
        top: 15px;
        right: 15px;
        gap: 5px;
    }
    
    .theme-toggle-btn {
        width: 32px;
        height: 32px;
    }
    
    .theme-toggle-btn svg {
        width: 16px;
        height: 16px;
    }
    
    .footer-logo {
        font-size: 18px;
    }
    
    .heart-icon-footer {
        width: 18px;
        height: 18px;
    }
}

/* ========================================
   АДАПТИВ: МОБИЛЬНЫЕ (до 768px)
======================================== */

@media (max-width: 768px) {
    html {
        font-size: 14px;
    }

    nav {
        flex-direction: column;
        gap: 15px;
        padding: 15px 20px;
    }

    .logo {
        font-size: 28px;
    }

    nav ul {
        gap: 15px;
        flex-wrap: wrap;
        justify-content: center;
    }

    nav ul li a {
        font-size: 15px;
        padding: 8px 12px;
    }

    .team-section {
        padding: 100px 20px 60px;
    }

    .team-header {
        margin-bottom: 50px;
    }

    .team-header h1 {
        font-size: 36px;
        margin-bottom: 15px;
    }

    .team-header p {
        font-size: 16px;
    }

    .team-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .team-member {
        padding: 30px 25px;
    }

    .team-avatar {
        width: 100px;
        height: 100px;
    }

    .team-avatar:not(:has(img))::before {
        font-size: 50px;
    }

    .team-name {
        font-size: 22px;
    }

    .team-role {
        font-size: 15px;
    }

    .team-description {
        font-size: 14px;
    }

    .team-social-link {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }

    .minecraft-link::before {
        font-size: 12px;
        padding: 6px 10px;
    }
    
    .minecraft-link::after {
        border-width: 5px;
    }

    footer {
        padding: 40px 20px 25px;
        margin-top: 60px;
    }

    .footer-logo {
        font-size: 18px;
    }

    .theme-switcher {
        top: auto;
        bottom: 20px;
        right: 15px;
        padding: 10px;
        max-width: calc(100vw - 30px);
    }

    .theme-buttons {
        flex-direction: row;
        gap: 8px;
    }

    .theme-btn {
        padding: 8px 10px;
        font-size: 10px;
        flex: 1;
    }

    .theme-icon {
        font-size: 14px;
    }

    .theme-btn span:not(.theme-icon) {
        display: none;
    }

    .notification {
        bottom: 90px;
        right: 15px;
        left: 15px;
        padding: 16px 20px;
        font-size: 14px;
        max-width: calc(100vw - 30px);
    }
}
@media (max-width: 480px) {
    .logo {
        font-size: 20px;
    }
    
    .heart-icon {
        width: 20px;
        height: 20px;
    }

    nav ul li a {
        font-size: 13px;
        padding: 6px 10px;
    }
    
    .theme-toggle-header {
        top: 12px;
        right: 12px;
    }
    
    .theme-toggle-btn {
        width: 28px;
        height: 28px;
    }
    
    .theme-toggle-btn svg {
        width: 14px;
        height: 14px;
    }
    
    .footer-logo {
        font-size: 16px;
    }
    
    .heart-icon-footer {
        width: 16px;
        height: 16px;
    }
}

/* ========================================
   АДАПТИВ: МАЛЕНЬКИЕ МОБИЛЬНЫЕ (до 480px)
======================================== */

@media (max-width: 480px) {
    .logo {
        font-size: 24px;
    }

    nav ul li a {
        font-size: 13px;
        padding: 6px 10px;
    }

    .team-section {
        padding: 90px 15px 50px;
    }

    .team-header h1 {
        font-size: 28px;
    }

    .team-header p {
        font-size: 14px;
    }

    .team-grid {
        gap: 20px;
    }

    .team-member {
        padding: 25px 20px;
    }

    .team-avatar {
        width: 90px;
        height: 90px;
    }

    .team-avatar:not(:has(img))::before {
        font-size: 45px;
    }

    .team-name {
        font-size: 20px;
    }

    .team-role {
        font-size: 14px;
    }

    .team-description {
        font-size: 13px;
    }

    .team-social-link {
        width: 34px;
        height: 34px;
        font-size: 15px;
    }

    footer {
        padding: 35px 15px 20px;
    }

    .footer-logo,
    .footer-copyright,
    .footer-disclaimer {
        font-size: 14px;
    }

    .footer-info p {
        font-size: 12px;
    }

    .notification {
        bottom: 80px;
        right: 10px;
        left: 10px;
        padding: 14px 18px;
        font-size: 13px;
    }

    .theme-switcher {
        bottom: 15px;
        right: 10px;
        left: 10px;
        padding: 8px;
    }

    .theme-btn {
        padding: 6px 8px;
        font-size: 9px;
    }

    .theme-icon {
        font-size: 12px;
    }
}

/* ========================================
   АДАПТИВ: БОЛЬШИЕ ЭКРАНЫ (от 1600px)
======================================== */

@media (min-width: 1600px) {
    nav,
    .team-section {
        max-width: 1600px;
    }

    .team-header h1 {
        font-size: 64px;
    }

    .team-header p {
        font-size: 22px;
    }

    .team-grid {
        grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    }
}

/* ========================================
   УЛУЧШЕНИЯ ПРОИЗВОДИТЕЛЬНОСТИ
======================================== */

.team-member,
.team-avatar {
    will-change: transform;
}

/* ========================================
   УТИЛИТЫ
======================================== */

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ========================================
   ФОКУС ДЛЯ ДОСТУПНОСТИ
======================================== */

a:focus,
button:focus {
    outline: 3px solid var(--accent-primary);
    outline-offset: 4px;
}

a:focus:not(:focus-visible),
button:focus:not(:focus-visible) {
    outline: none;
}

/* ========================================
   ПЕЧАТЬ
======================================== */

@media print {
    header {
        position: static;
        box-shadow: none;
    }
    
    .parallax-bg,
    .theme-switcher {
        display: none;
    }
    
    .notification {
        display: none;
    }

    .team-section {
        padding: 40px 20px;
    }

    .team-member {
        page-break-inside: avoid;
    }
}

/* ========================================
   ДОПОЛНИТЕЛЬНЫЕ ФИКСЫ
======================================== */

/* Поддержка iOS Safari */
@supports (-webkit-touch-callout: none) {
    body {
        -webkit-overflow-scrolling: touch;
    }
}

/* Улучшение для тачскринов */
@media (hover: none) and (pointer: coarse) {
    nav ul li a,
    .theme-btn,
    .team-social-link {
        min-height: 44px;
        min-width: 44px;
    }
}

/* Уменьшение анимаций для пользователей с ограниченными возможностями */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ========================================
   ДОПОЛНИТЕЛЬНЫЕ СОСТОЯНИЯ
======================================== */

/* Состояние загрузки */
body.loading {
    overflow: hidden;
}

body.loading::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-primary);
    z-index: 9999;
    opacity: 1;
    transition: opacity 0.5s ease;
}

body.loaded::before {
    opacity: 0;
    pointer-events: none;
}

/* ========================================
   АНИМАЦИЯ ПОЯВЛЕНИЯ СТРАНИЦЫ
======================================== */

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

body.loaded {
    animation: fadeIn 0.5s ease-in-out;
}

/* ========================================
   ДОПОЛНИТЕЛЬНЫЕ ЭФФЕКТЫ
======================================== */

/* Эффект свечения при наведении на кнопки */
.theme-btn:hover,
.team-social-link:hover {
    box-shadow: 0 0 20px var(--accent-primary);
}

/* Плавное появление тултипа */
.minecraft-link::before,
.minecraft-link::after {
    will-change: opacity, transform;
}

/* Оптимизация для анимаций */
.team-member,
.parallax-layer,
.logo {
    backface-visibility: hidden;
    perspective: 1000px;
}

/* ========================================
   РЕЖИМ ВЫСОКОЙ КОНТРАСТНОСТИ
======================================== */

@media (prefers-contrast: high) {
    :root[data-theme="dark"],
    :root[data-theme="light"] {
        --border-color: var(--accent-primary);
    }

    .team-member {
        border-width: 3px;
    }

    .theme-btn,
    .team-social-link {
        border-width: 3px;
    }
}

/* ========================================
   ТЕМНАЯ ТЕМА СИСТЕМЫ
======================================== */

@media (prefers-color-scheme: dark) {
    :root:not([data-theme]) {
        --bg-primary: #0f0f0f;
        --bg-secondary: rgba(15, 15, 15, 0.95);
        --bg-card: rgba(220, 38, 38, 0.06);
        --bg-card-hover: rgba(220, 38, 38, 0.12);
        --text-primary: #e8e8e8;
        --text-secondary: #b8b8b8;
        --accent-primary: #dc2626;
        --accent-secondary: #b91c1c;
        --border-color: rgba(220, 38, 38, 0.2);
        --shadow-color: rgba(220, 38, 38, 0.15);
        --gradient-start: rgba(220, 38, 38, 0.08);
        --gradient-end: rgba(185, 28, 28, 0.08);
    }
}

/* ========================================
   СВЕТЛАЯ ТЕМА СИСТЕМЫ
======================================== */

@media (prefers-color-scheme: light) {
    :root:not([data-theme]) {
        --bg-primary: #fafafa;
        --bg-secondary: rgba(255, 255, 255, 0.95);
        --bg-card: rgba(220, 38, 38, 0.04);
        --bg-card-hover: rgba(220, 38, 38, 0.08);
        --text-primary: #2a2a2a;
        --text-secondary: #5a5a5a;
        --accent-primary: #dc2626;
        --accent-secondary: #b91c1c;
        --border-color: rgba(220, 38, 38, 0.15);
        --shadow-color: rgba(220, 38, 38, 0.1);
        --gradient-start: rgba(220, 38, 38, 0.05);
        --gradient-end: rgba(185, 28, 28, 0.05);
    }
}

/* ========================================
   ЗАЩИТА ОТ КОПИРОВАНИЯ (ОПЦИОНАЛЬНО)
======================================== */

/* Раскомментируйте если нужно отключить выделение текста */
/*
.team-member {
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}
*/

/* ========================================
   ДОПОЛНИТЕЛЬНЫЕ АНИМАЦИИ
======================================== */

/* Пульсация для важных элементов */
@keyframes heartbeat {
    0%, 100% {
        transform: scale(1);
    }
    10%, 30% {
        transform: scale(0.95);
    }
    20%, 40%, 60%, 80% {
        transform: scale(1.05);
    }
    50%, 70% {
        transform: scale(1.1);
    }
}

/* Применить к логотипу при желании */
/*
.logo:hover {
    animation: heartbeat 1.5s ease-in-out;
}
*/

/* ========================================
   КОНЕЦ ФАЙЛА
======================================== */