/* Анимированный логотип с вращающимся кубом */
.animated-logo-container {
    width: 40px;
    height: 40px;
    perspective: 100px;
    margin-right: 15px;
}

.rotating-cube {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    animation: rotateCube 4s infinite linear;
}

.cube-face {
    position: absolute;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #00d4aa, #00ff88);
    border: 2px solid #00ffff;
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.3);
}

/* Современный минималистичный эффект для куба */
.glass-cube .cube-face {
    background: linear-gradient(135deg, 
        rgba(0, 255, 255, 0.8) 0%,
        rgba(0, 212, 170, 0.9) 50%,
        rgba(0, 255, 136, 0.8) 100%);
    border: 2px solid rgba(0, 255, 255, 0.6);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    box-shadow: 
        0 0 20px rgba(0, 255, 255, 0.6),
        inset 0 0 15px rgba(255, 255, 255, 0.2),
        inset 0 0 8px rgba(0, 255, 255, 0.3);
    border-radius: 8px;
}

.glass-cube .cube-face.front,
.glass-cube .cube-face.back {
    background: linear-gradient(135deg, 
        rgba(0, 255, 255, 0.95) 0%,
        rgba(0, 212, 170, 1) 50%,
        rgba(0, 255, 136, 0.95) 100%);
    border: 2px solid rgba(255, 255, 255, 0.8);
    box-shadow: 
        0 0 25px rgba(0, 255, 255, 0.8),
        inset 0 0 20px rgba(255, 255, 255, 0.3),
        inset 0 0 10px rgba(0, 255, 255, 0.4);
}

.glass-cube .cube-face.left,
.glass-cube .cube-face.right,
.glass-cube .cube-face.top,
.glass-cube .cube-face.bottom {
    background: linear-gradient(135deg, 
        rgba(26, 26, 46, 0.1) 0%,
        rgba(22, 33, 62, 0.05) 50%,
        rgba(0, 255, 255, 0.05) 100%);
    border: 1px solid rgba(0, 255, 255, 0.2);
    box-shadow: 
        0 0 20px rgba(0, 255, 255, 0.2),
        inset 0 0 15px rgba(255, 255, 255, 0.05);
}

.cube-face.front {
    transform: translateZ(20px);
}

.cube-face.back {
    transform: translateZ(-20px) rotateY(180deg);
}

.cube-face.left {
    transform: rotateY(-90deg) translateZ(20px);
}

.cube-face.right {
    transform: rotateY(90deg) translateZ(20px);
}

.cube-face.top {
    transform: rotateX(90deg) translateZ(20px);
}

.cube-face.bottom {
    transform: rotateX(-90deg) translateZ(20px);
}

@keyframes rotateCube {
    0% { transform: rotateX(0deg) rotateY(0deg); }
    25% { transform: rotateX(0deg) rotateY(90deg); }
    50% { transform: rotateX(0deg) rotateY(180deg); }
    75% { transform: rotateX(0deg) rotateY(270deg); }
    100% { transform: rotateX(0deg) rotateY(360deg); }
}

/* Стили для героя */
.hero-logo-container {
    width: 80px;
    height: 80px;
    margin: 0 auto 2rem auto;
    perspective: 160px;
}

.hero-cube {
    animation: rotateCube 6s infinite linear;
}

.hero-cube .cube-face {
    width: 80px;
    height: 80px;
}

.hero-cube .cube-face.front {
    transform: translateZ(40px);
}

.hero-cube .cube-face.back {
    transform: translateZ(-40px) rotateY(180deg);
}

.hero-cube .cube-face.left {
    transform: rotateY(-90deg) translateZ(40px);
}

.hero-cube .cube-face.right {
    transform: rotateY(90deg) translateZ(40px);
}

.hero-cube .cube-face.top {
    transform: rotateX(90deg) translateZ(40px);
}

.hero-cube .cube-face.bottom {
    transform: rotateX(-90deg) translateZ(40px);
}

/* Стили для фонового логотипа */
.logo-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    opacity: 0.1;
}

.background-logo-item {
    position: absolute;
    width: 120px;
    height: 120px;
    perspective: 240px;
}

.background-logo-item:nth-child(1) {
    top: 10%;
    right: 10%;
    animation-delay: 0s;
}

.background-logo-item:nth-child(2) {
    bottom: 20%;
    left: 15%;
    animation-delay: 2s;
}

.background-logo-item:nth-child(3) {
    top: 60%;
    right: 25%;
    animation-delay: 4s;
}

.background-logo-item .rotating-cube {
    animation: rotateCube 10s infinite linear;
}

.background-logo-item .cube-face {
    width: 120px;
    height: 120px;
}

.background-logo-item .cube-face.front {
    transform: translateZ(60px);
}

.background-logo-item .cube-face.back {
    transform: translateZ(-60px) rotateY(180deg);
}

.background-logo-item .cube-face.left {
    transform: rotateY(-90deg) translateZ(60px);
}

.background-logo-item .cube-face.right {
    transform: rotateY(90deg) translateZ(60px);
}

.background-logo-item .cube-face.top {
    transform: rotateX(90deg) translateZ(60px);
}

.background-logo-item .cube-face.bottom {
    transform: rotateX(-90deg) translateZ(60px);
}

/* Текст логотипа */
.logo-text {
    font-family: 'Orbitron', sans-serif;
    font-weight: 800;
    font-size: 16px;
    text-align: center;
    text-transform: uppercase;
    color: #ffffff;
    text-shadow: 
        0 0 5px rgba(255, 255, 255, 0.8),
        0 0 10px rgba(0, 255, 255, 0.6),
        0 0 15px rgba(0, 255, 255, 0.4);
    letter-spacing: 2px;
}

.hero-cube .logo-text {
    font-size: 24px;
    letter-spacing: 3px;
}

.background-logo-item .logo-text {
    font-size: 32px;
    letter-spacing: 4px;
}

/* Диодная подсветка для II и SOS */
.ii-text {
    animation: iiGlow 2s ease-in-out infinite alternate;
}

.sos-text {
    animation: sosGlow 2s ease-in-out infinite alternate;
    animation-delay: 1s;
}

@keyframes iiGlow {
    from {
        color: #ffffff;
        text-shadow: 
            0 0 5px rgba(255, 255, 255, 0.8),
            0 0 10px rgba(0, 255, 255, 0.6),
            0 0 15px rgba(0, 255, 255, 0.4);
    }
    to {
        color: #00ffff;
        text-shadow: 
            0 0 10px rgba(0, 255, 255, 1),
            0 0 20px rgba(0, 255, 255, 0.8),
            0 0 30px rgba(0, 255, 255, 0.6),
            0 0 40px rgba(0, 255, 255, 0.4);
    }
}

@keyframes sosGlow {
    from {
        color: #ffffff;
        text-shadow: 
            0 0 5px rgba(255, 255, 255, 0.8),
            0 0 10px rgba(0, 255, 136, 0.6),
            0 0 15px rgba(0, 255, 136, 0.4);
    }
    to {
        color: #00ff88;
        text-shadow: 
            0 0 10px rgba(0, 255, 136, 1),
            0 0 20px rgba(0, 255, 136, 0.8),
            0 0 30px rgba(0, 255, 136, 0.6),
            0 0 40px rgba(0, 255, 136, 0.4);
    }
}

/* Адаптивность */
@media (max-width: 768px) {
    .hero-logo-container {
        width: 60px;
        height: 60px;
    }
    
    .hero-cube .cube-face {
        width: 60px;
        height: 60px;
    }
    
    .hero-cube .logo-text {
        font-size: 18px;
    }
    
    .background-logo-item {
        width: 80px;
        height: 80px;
    }
    
    .background-logo-item .cube-face {
        width: 80px;
        height: 80px;
    }
}

.cube-face.back {
    transform: translateZ(-20px) rotateY(180deg);
}

.cube-face.left {
    transform: rotateY(-90deg) translateZ(20px);
    background: linear-gradient(135deg, #1a1a2e, #16213e);
}

.cube-face.right {
    transform: rotateY(90deg) translateZ(20px);
    background: linear-gradient(135deg, #1a1a2e, #16213e);
}

.cube-face.top {
    transform: rotateX(90deg) translateZ(20px);
    background: linear-gradient(135deg, #1a1a2e, #16213e);
}

.cube-face.bottom {
    transform: rotateX(-90deg) translateZ(20px);
    background: linear-gradient(135deg, #1a1a2e, #16213e);
}

.logo-text {
    font-family: 'Orbitron', monospace;
    font-weight: 800;
    font-size: 12px;
    color: #ffffff;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
    animation: textFade 4s infinite;
}

.ii-text {
    animation-delay: 0s;
    color: #000000;
    font-weight: 900;
    text-shadow: 
        0 0 5px rgba(255, 255, 255, 0.8),
        0 1px 2px rgba(0, 0, 0, 0.3);
}

.sos-text {
    animation-delay: 2s;
    color: #000000;
    font-weight: 900;
    text-shadow: 
        0 0 5px rgba(255, 255, 255, 0.8),
        0 1px 2px rgba(0, 0, 0, 0.3);
}

@keyframes rotateCube {
    0% {
        transform: rotateY(0deg) rotateX(0deg);
    }
    25% {
        transform: rotateY(90deg) rotateX(0deg);
    }
    50% {
        transform: rotateY(180deg) rotateX(0deg);
    }
    75% {
        transform: rotateY(270deg) rotateX(0deg);
    }
    100% {
        transform: rotateY(360deg) rotateX(0deg);
    }
}

@keyframes textFade {
    0%, 40% {
        opacity: 1;
        transform: scale(1);
    }
    45%, 95% {
        opacity: 0;
        transform: scale(0.8);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Адаптация логотипа в навбаре */
.navbar-logo {
    display: flex;
    align-items: center;
    color: #00ffff;
    text-decoration: none;
    transition: all 0.3s ease;
}

.navbar-logo:hover {
    color: #00d4aa;
    text-decoration: none;
}

.navbar-logo h1 {
    font-family: 'Orbitron', monospace;
    font-weight: 700;
    font-size: 1.8rem;
    margin: 0;
    background: linear-gradient(45deg, #00ffff, #00d4aa);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 30px rgba(0, 255, 255, 0.3);
}

/* Hover эффект для всего логотипа */
.navbar-logo:hover .rotating-cube {
    animation-duration: 1s;
}

.navbar-logo:hover .animated-logo-container {
    transform: scale(1.1);
}

/* Дополнительные эффекты для стеклянного куба */
.glass-cube .cube-face::before {
    content: '';
    position: absolute;
    top: 5%;
    left: 5%;
    width: 90%;
    height: 90%;
    background: linear-gradient(45deg, 
        rgba(255, 255, 255, 0.1) 0%,
        rgba(255, 255, 255, 0.05) 50%,
        rgba(255, 255, 255, 0.1) 100%);
    border-radius: 8px;
    pointer-events: none;
}

.glass-cube .cube-face::after {
    content: '';
    position: absolute;
    top: 10%;
    left: 80%;
    width: 15%;
    height: 40%;
    background: linear-gradient(to bottom, 
        rgba(255, 255, 255, 0.4) 0%,
        rgba(255, 255, 255, 0.1) 100%);
    border-radius: 2px;
    transform: skew(-10deg);
    pointer-events: none;
}

/* Анимация мерцания для хрустального эффекта */
@keyframes crystalShine {
    0%, 100% {
        box-shadow: 
            0 0 30px rgba(0, 255, 255, 0.4),
            inset 0 0 20px rgba(255, 255, 255, 0.1),
            inset 0 0 5px rgba(0, 255, 255, 0.2);
    }
    50% {
        box-shadow: 
            0 0 40px rgba(0, 255, 255, 0.6),
            inset 0 0 30px rgba(255, 255, 255, 0.2),
            inset 0 0 10px rgba(0, 255, 255, 0.4);
    }
}

.glass-cube .cube-face.front,
.glass-cube .cube-face.back {
    animation: crystalShine 3s ease-in-out infinite;
}

/* Стили для футера */
.footer-logo .animated-logo-container {
    width: 50px;
    height: 50px;
    margin: 0 auto 20px;
}

.footer-logo .cube-face {
    width: 50px;
    height: 50px;
}

.footer-logo .glass-cube .cube-face {
    width: 50px;
    height: 50px;
}

.footer-logo .cube-face.front {
    transform: translateZ(25px);
}

.footer-logo .cube-face.back {
    transform: translateZ(-25px) rotateY(180deg);
}

.footer-logo .cube-face.left {
    transform: rotateY(-90deg) translateZ(25px);
}

.footer-logo .cube-face.right {
    transform: rotateY(90deg) translateZ(25px);
}

.footer-logo .cube-face.top {
    transform: rotateX(90deg) translateZ(25px);
}

.footer-logo .cube-face.bottom {
    transform: rotateX(-90deg) translateZ(25px);
}

.footer-logo .logo-text {
    font-size: 14px;
}

/* Стили для копирайта */
.copyright-logo {
    width: 30px;
    height: 30px;
    margin-right: 10px;
    display: inline-block;
}

.copyright-logo .cube-face {
    width: 30px;
    height: 30px;
}

.copyright-logo .glass-cube .cube-face {
    width: 30px;
    height: 30px;
}

.copyright-logo .cube-face.front {
    transform: translateZ(15px);
}

.copyright-logo .cube-face.back {
    transform: translateZ(-15px) rotateY(180deg);
}

.copyright-logo .cube-face.left {
    transform: rotateY(-90deg) translateZ(15px);
}

.copyright-logo .cube-face.right {
    transform: rotateY(90deg) translateZ(15px);
}

.copyright-logo .cube-face.top {
    transform: rotateX(90deg) translateZ(15px);
}

.copyright-logo .cube-face.bottom {
    transform: rotateX(-90deg) translateZ(15px);
}

.copyright-logo .logo-text {
    font-size: 8px;
}

.copyright-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Мобильная адаптация */
@media (max-width: 768px) {
    .animated-logo-container {
        width: 35px;
        height: 35px;
        margin-right: 10px;
    }
    
    .cube-face {
        width: 35px;
        height: 35px;
    }
    
    .cube-face.front {
        transform: translateZ(17.5px);
    }
    
    .cube-face.back {
        transform: translateZ(-17.5px) rotateY(180deg);
    }
    
    .cube-face.left {
        transform: rotateY(-90deg) translateZ(17.5px);
    }
    
    .cube-face.right {
        transform: rotateY(90deg) translateZ(17.5px);
    }
    
    .cube-face.top {
        transform: rotateX(90deg) translateZ(17.5px);
    }
    
    .cube-face.bottom {
        transform: rotateX(-90deg) translateZ(17.5px);
    }
    
    .logo-text {
        font-size: 10px;
    }
    
    .navbar-logo h1 {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .animated-logo-container {
        width: 30px;
        height: 30px;
        margin-right: 8px;
    }
    
    .cube-face {
        width: 30px;
        height: 30px;
    }
    
    .logo-text {
        font-size: 9px;
    }
    
    .navbar-logo h1 {
        font-size: 1.3rem;
    }
}