:root {
    --background-color: #ffffff;
    --text-color: #000000;
    --accent-color: #CE0E0E;
    --loader-bg: #ffffff;
}

.dark-theme {
    --background-color: #1a1a1a;
    --text-color: #ffffff;
    --accent-color: #ff3333;
    --loader-bg: #1a1a1a;
}

body {
    font-family: Inter, Arial, sans-serif;
    line-height: 1.6;
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    color: var(--text-color);
    overflow-x: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    -webkit-overflow-scrolling: touch;
    overflow: visible;
    background: var(--background-color);
    transition: background-color 0.3s ease, color 0.3s ease;
    font-size: 16px;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('Image/background-texture-image.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    mix-blend-mode: overlay;
    opacity: 0.5;
    pointer-events: none;
}

/* Фон для светлой темы */
body:not(.dark-theme)::before {
    mix-blend-mode: multiply;
    opacity: 0.1;
}

.header-logo-duplicate {
    width: 100%;
    height: auto;
    margin-bottom: 30px;
    opacity: 0;
    transform-style: preserve-3d;
    perspective: 1000px;
    position: relative;
    overflow: visible;
    padding: 50px;
    margin: -50px;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.header-logo-duplicate:hover {
    transform: scale(1.02);
}

.header-logo-duplicate:active {
    transform: scale(0.98);
}

.header-logo-duplicate.animate {
    animation: fadeIn 1s ease forwards;
}

.header-logo-duplicate path {
    fill: #000;
    opacity: 0;
    transform: translateZ(50px) scale(0.8) rotateX(180deg) rotateY(180deg);
    transform-origin: center center;
}

.header-logo-duplicate.animate path {
    animation: assembleLogo 4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.header-logo-duplicate.animate path:nth-child(1) { animation-delay: 0s; }
.header-logo-duplicate.animate path:nth-child(2) { animation-delay: 0.2s; }
.header-logo-duplicate.animate path:nth-child(3) { animation-delay: 0.4s; }
.header-logo-duplicate.animate path:nth-child(4) { animation-delay: 0.6s; }
.header-logo-duplicate.animate path:nth-child(5) { animation-delay: 0.8s; }
.header-logo-duplicate.animate path:nth-child(6) { animation-delay: 1s; }
.header-logo-duplicate.animate path:nth-child(7) { animation-delay: 1.2s; }
.header-logo-duplicate.animate path:nth-child(8) { animation-delay: 1.4s; }
.header-logo-duplicate.animate path:nth-child(9) { animation-delay: 1.6s; }
.header-logo-duplicate.animate path:nth-child(10) { animation-delay: 1.8s; }
.header-logo-duplicate.animate path:nth-child(11) { animation-delay: 2s; }
.header-logo-duplicate.animate path:nth-child(12) { animation-delay: 2.2s; }
.header-logo-duplicate.animate path:nth-child(13) { animation-delay: 2.4s; }
.header-logo-duplicate.animate path:nth-child(14) { animation-delay: 2.6s; }
.header-logo-duplicate.animate path:nth-child(15) { animation-delay: 2.8s; }

.header-logo-duplicate circle {
    fill: #CE0E0E;
    opacity: 0;
    transform: translateZ(50px) scale(0.8) rotateX(-180deg) rotateY(-180deg);
    transform-origin: center center;
}

.header-logo-duplicate.animate circle {
    animation: assembleLogo 4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    animation-delay: 3s;
}

.header-logo-duplicate line {
    stroke: #000;
    stroke-width: 11;
    opacity: 0;
    transform: translateZ(50px) scale(0.8) rotateX(90deg) rotateY(90deg);
    transform-origin: center center;
}

.header-logo-duplicate.animate line {
    animation: assembleLogo 4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.header-logo-duplicate.animate line:nth-child(1) { animation-delay: 3.2s; }
.header-logo-duplicate.animate line:nth-child(2) { animation-delay: 3.4s; }
.header-logo-duplicate.animate line:nth-child(3) { animation-delay: 3.6s; }
.header-logo-duplicate.animate line:nth-child(4) { animation-delay: 3.8s; }
.header-logo-duplicate.animate line:nth-child(5) { animation-delay: 4s; }
.header-logo-duplicate.animate line:nth-child(6) { animation-delay: 4.2s; }
.header-logo-duplicate.animate line:nth-child(7) { animation-delay: 4.4s; }
.header-logo-duplicate.animate line:nth-child(8) { animation-delay: 4.6s; }

body.dark-theme .header-logo-duplicate path {
    fill: #fff;
}

body.dark-theme .header-logo-duplicate line {
    stroke: #fff;
}

@keyframes assembleLogo {
    0% {
        opacity: 0;
        transform: translateZ(50px) scale(0.8) rotateX(180deg) rotateY(180deg);
    }
    20% {
        opacity: 0.3;
        transform: translateZ(150px) scale(0.9) rotateX(120deg) rotateY(120deg);
    }
    40% {
        opacity: 0.6;
        transform: translateZ(100px) scale(0.95) rotateX(60deg) rotateY(60deg);
    }
    60% {
        opacity: 0.8;
        transform: translateZ(50px) scale(1.05) rotateX(-30deg) rotateY(-30deg);
    }
    80% {
        opacity: 1;
        transform: translateZ(0) scale(1.02) rotateX(-15deg) rotateY(-15deg);
    }
    100% {
        opacity: 1;
        transform: translateZ(0) scale(1) rotateX(0) rotateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateZ(-100px) rotateX(-45deg);
    }
    to {
        opacity: 1;
        transform: translateZ(0) rotateX(0);
    }
}

.content-wrapper {
    position: relative;
    z-index: 1;
    padding: 40px;
    border-radius: 0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    opacity: 0;
    animation: fadeIn 1s ease forwards 0.3s;
    overflow: visible;
    width: 100%;
    box-sizing: border-box;
}

p, h1, h2, ul {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s ease forwards;
}

h1 {
    color: var(--text-color);
    text-align: center;
    margin-bottom: 30px;
    animation-delay: 0.5s;
}

h2 {
    color: var(--text-color);
    margin-top: 25px;
}

p {
    margin-bottom: 15px;
}

.last-updated {
    font-style: italic;
    color: var(--text-color);
    margin-top: 30px;
}

.back-button {
    display: inline-block;
    padding: 10px 20px;
    background: var(--accent-color);
    color: white;
    text-decoration: none;
    border-radius: 0;
    margin-bottom: 20px;
    transition: background-color 0.3s;
    opacity: 0;
    animation: fadeIn 0.8s ease forwards 0.7s;
    margin-top: 30px;
}

.back-button:hover {
    background: hsl(0, 82%, 15%);
}

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

.theme-switcher {
    position: fixed;
    top: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    cursor: pointer;
    z-index: 100;
    opacity: 0;
    animation: fadeIn 0.8s ease forwards 0.2s;
    transform: none;
    transition: all 0.3s ease;
}

.theme-icon {
    width: 30px;
    height: 30px;
    stroke: var(--text-color);
    transition: all 0.3s ease;
}

.theme-icon:hover {
    opacity: 0.7;
}

.theme-icon.active-icon {
    display: block;
}

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

.loader-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--loader-bg);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease-out, background-color 0.3s ease;
}

.loader-screen.fade-out {
    opacity: 0;
    pointer-events: none;
}

.loader-logo {
    width: 300px;
    height: 113px;
    position: relative;
    transform-style: preserve-3d;
    perspective: 1000px;
    opacity: 0;
    animation: fadeInLogo 0.5s ease forwards;
}

.loader-logo svg {
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    color: var(--text-color);
}

.loader-logo path {
    opacity: 0;
    transform: translateZ(50px) scale(0.8) rotateX(180deg) rotateY(180deg);
    animation: assembleLogo 1s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    transform-origin: center center;
    fill: currentColor;
}

a {
    color: #910d0d;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #FFFFFF;
    text-decoration: underline;
}

.loader-logo path:nth-child(1) { animation-delay: 0.1s; }
.loader-logo path:nth-child(2) { animation-delay: 0.2s; }
.loader-logo path:nth-child(3) { animation-delay: 0.3s; }
.loader-logo path:nth-child(4) { animation-delay: 0.4s; }
.loader-logo path:nth-child(5) { animation-delay: 0.5s; }
.loader-logo path:nth-child(6) { animation-delay: 0.6s; }
.loader-logo path:nth-child(7) { animation-delay: 0.7s; }
.loader-logo path:nth-child(8) { animation-delay: 0.8s; }
.loader-logo path:nth-child(9) { animation-delay: 0.9s; }
.loader-logo path:nth-child(10) { animation-delay: 1s; }
.loader-logo path:nth-child(11) { animation-delay: 1.1s; }
.loader-logo path:nth-child(12) { animation-delay: 1.2s; }
.loader-logo path:nth-child(13) { animation-delay: 1.3s; }
.loader-logo path:nth-child(14) { animation-delay: 1.4s; }
.loader-logo path:nth-child(15) { animation-delay: 1.5s; }

.loader-logo circle {
    opacity: 0;
    transform: translateZ(50px) scale(0.8) rotateX(-180deg) rotateY(-180deg);
    animation: assembleLogo 1s cubic-bezier(0.4, 0, 0.2, 1) forwards 1.6s;
    transform-origin: center center;
    fill: #CE0E0E;
}

.loader-logo line {
    opacity: 0;
    transform: translateZ(50px) scale(0.8) rotateX(90deg) rotateY(90deg);
    animation: assembleLogo 1s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    transform-origin: center center;
    stroke: currentColor;
    stroke-width: 11;
}

.loader-logo line:nth-child(1) { animation-delay: 1.7s; }
.loader-logo line:nth-child(2) { animation-delay: 1.8s; }
.loader-logo line:nth-child(3) { animation-delay: 1.9s; }
.loader-logo line:nth-child(4) { animation-delay: 2s; }
.loader-logo line:nth-child(5) { animation-delay: 2.1s; }
.loader-logo line:nth-child(6) { animation-delay: 2.2s; }
.loader-logo line:nth-child(7) { animation-delay: 2.3s; }
.loader-logo line:nth-child(8) { animation-delay: 2.4s; }

@keyframes fadeInLogo {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.loader-progress {
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 2px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
}

.loader-progress::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0;
    background: var(--accent-color);
    animation: progress 3s ease-in-out forwards;
}

@keyframes progress {
    0% { width: 0; }
    100% { width: 100%; }
}

@media (max-width: 1200px) {
    .header-logo-duplicate {
        padding: 40px;
        margin: -40px;
    }
    
    .header-logo-duplicate svg {
        max-width: 800px;
    }
}

@media (max-width: 992px) {
    .header-logo-duplicate {
        padding: 30px;
        margin: -30px;
    }
    
    .header-logo-duplicate svg {
        max-width: 700px;
    }
}

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

    .content-wrapper {
        padding: 20px;
    }

    h1 {
        font-size: 24px;
        margin-bottom: 20px;
    }

    h2 {
        font-size: 20px;
        margin-top: 20px;
    }

    p {
        margin-bottom: 12px;
    }

    .back-button {
        padding: 8px 16px;
        font-size: 14px;
    }

    .theme-switcher {
        top: 10px;
        right: 10px;
    }

    .theme-icon {
        width: 24px;
        height: 24px;
    }

    .header-logo-duplicate {
        padding: 20px;
        margin: -20px;
    }
    
    .header-logo-duplicate svg {
        max-width: 600px;
    }

    .header-logo-duplicate line {
        stroke-width: 8;
    }
}

@media (max-width: 576px) {
    .header-logo-duplicate {
        padding: 15px;
        margin: -15px;
    }
    
    .header-logo-duplicate svg {
        max-width: 400px;
    }

    .header-logo-duplicate line {
        stroke-width: 6;
    }
}

@media (max-width: 400px) {
    .header-logo-duplicate {
        padding: 10px;
        margin: -10px;
    }
    
    .header-logo-duplicate svg {
        max-width: 300px;
    }

    .header-logo-duplicate line {
        stroke-width: 4;
    }
}

@media (max-width: 480px) {
    body {
        padding: 5px;
        font-size: 13px;
    }

    .content-wrapper {
        padding: 15px;
    }

    h1 {
        font-size: 22px;
        margin-bottom: 15px;
    }

    h2 {
        font-size: 18px;
        margin-top: 15px;
    }

    p {
        margin-bottom: 10px;
    }

    .back-button {
        padding: 6px 12px;
        font-size: 13px;
        width: 100%;
        text-align: center;
        box-sizing: border-box;
    }

    .theme-switcher {
        top: 5px;
        right: 5px;
    }

    .theme-icon {
        width: 20px;
        height: 20px;
    }

    .last-updated {
        font-size: 12px;
    }
}