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

:root {
    --bg-primary: #000000;
    --bg-secondary: #0a0a0a;
    --bg-tertiary: #151515;
    --text-primary: #ffffff;
    --text-secondary: #e0e0e0;
    --text-muted: #b0b0b0;
    --text-accent: #00ff88;
    --text-accent-secondary: #7affb3;
    --accent: #00ff88;
    --accent-hover: #00cc6a;
    --accent-purple: #a855f7;
    --accent-blue: #3b82f6;
    --accent-cyan: #06b6d4;
    --glow-color: rgba(0, 255, 136, 0.25);
    --glow-purple: rgba(168, 85, 247, 0.3);
    --glow-blue: rgba(59, 130, 246, 0.3);
    --warning-color: #F59E0B;
    --danger-color: #EF4444;
}

html {
    height: 100%;
    background: #000000;
    overflow-x: hidden;
    scroll-behavior: auto;
}

html, body {
    scroll-padding-top: 0;
    scroll-margin-top: 0;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #000000 0%, #0a0a0a 50%, #000000 100%);
    background-attachment: fixed;
    background-size: cover;
    background-repeat: no-repeat;
    color: var(--text-secondary);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
    min-height: 100dvh; /* Для мобильных браузеров */
    margin: 0;
    padding: 0;
    top: 0;
}

@media (max-width: 640px) {
    body {
        background-attachment: scroll;
        background: #000000;
        position: relative;
        top: 0;
        left: 0;
    }
    
    html {
        background: #000000;
        position: relative;
        top: 0;
        left: 0;
    }
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
}

@media (max-width: 640px) {
    .container {
        padding: 0 15px;
    }
}

/* Gradient Text */
.gradient-text {
    background: linear-gradient(135deg, #00ff88 0%, #7affb3 50%, #00ff88 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    background-size: 200% auto;
    animation: gradient-shift 3s ease infinite;
}

@keyframes gradient-shift {
    0%, 100% {
        background-position: 0% center;
    }
    50% {
        background-position: 100% center;
    }
}

/* Glass Effect */
.glass-effect {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 255, 136, 0.2);
    box-shadow: 0 8px 32px 0 rgba(0, 255, 136, 0.1);
}

/* Background Animation */
.background-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    height: 100dvh; /* Для мобильных браузеров */
    z-index: 0;
    overflow: hidden;
    background: radial-gradient(circle at 20% 50%, rgba(0, 255, 136, 0.05) 0%, transparent 50%),
                radial-gradient(circle at 80% 80%, rgba(168, 85, 247, 0.05) 0%, transparent 50%),
                radial-gradient(circle at 40% 20%, rgba(59, 130, 246, 0.05) 0%, transparent 50%),
                #000000; /* Фон на случай, если градиенты не покрывают */
}

.particle {
    position: absolute;
    width: 6px;
    height: 6px;
    background: var(--text-primary);
    border-radius: 50%;
    opacity: 0.4;
    animation: float 15s infinite ease-in-out;
    box-shadow: 0 0 15px var(--text-primary);
}

.particle:nth-child(1) {
    left: 10%;
    animation-delay: 0s;
    animation-duration: 20s;
    background: var(--text-primary);
}

.particle:nth-child(2) {
    left: 30%;
    animation-delay: 2s;
    animation-duration: 18s;
    background: var(--accent-purple);
    box-shadow: 0 0 15px var(--accent-purple);
}

.particle:nth-child(3) {
    left: 50%;
    animation-delay: 4s;
    animation-duration: 22s;
    background: var(--accent-blue);
    box-shadow: 0 0 15px var(--accent-blue);
}

.particle:nth-child(4) {
    left: 70%;
    animation-delay: 6s;
    animation-duration: 19s;
    background: var(--accent-cyan);
    box-shadow: 0 0 15px var(--accent-cyan);
}

.particle:nth-child(5) {
    left: 90%;
    animation-delay: 8s;
    animation-duration: 21s;
    background: var(--text-secondary);
}

@keyframes float {
    0%, 100% {
        transform: translateY(100vh) translateX(0);
        opacity: 0;
    }
    10% {
        opacity: 0.4;
    }
    90% {
        opacity: 0.4;
    }
    100% {
        transform: translateY(-100px) translateX(50px);
        opacity: 0;
    }
}

/* Header для режима с панелью навигации */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 20px 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 1000;
    border-bottom: 1px solid rgba(0, 255, 136, 0.15);
    box-shadow: 0 4px 30px rgba(0, 255, 136, 0.08);
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.logo-link {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    transition: all 0.3s ease;
}

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

.logo-image {
    width: 40px;
    height: 40px;
    object-fit: contain;
    filter: drop-shadow(0 0 8px var(--glow-color));
    transition: all 0.3s ease;
}

.logo-link:hover .logo-image {
    filter: drop-shadow(0 0 12px var(--glow-color));
    transform: rotate(5deg);
}

.logo-text {
    font-size: 24px;
    font-weight: bold;
    color: #ffffff;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

.logo-dot {
    width: 10px;
    height: 10px;
    background: var(--accent);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--glow-color);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes glow {
    from {
        text-shadow: 0 0 15px var(--glow-color);
    }
    to {
        text-shadow: 0 0 25px var(--glow-color), 0 0 35px var(--glow-color);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.6;
        transform: scale(1.3);
    }
}

.nav {
    display: flex;
    gap: 30px;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    padding: 5px 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--text-primary), var(--text-secondary));
    transition: width 0.3s ease;
    box-shadow: 0 0 10px var(--text-primary);
}

.nav-link:hover {
    color: #ffffff;
}

.nav-link:hover::after {
    width: 100%;
}

/* Мобильное меню - скрыто по умолчанию */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 44px;
    height: 44px;
    padding: 10px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 255, 136, 0.3);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 1001;
}

.mobile-menu-toggle:hover {
    background: rgba(0, 255, 136, 0.1);
    border-color: var(--text-primary);
    box-shadow: 0 0 15px var(--glow-color);
}

.mobile-menu-toggle.active {
    border-color: var(--text-primary);
    box-shadow: 0 0 20px var(--glow-color);
}

.hamburger-line {
    width: 100%;
    height: 3px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all 0.3s ease;
    box-shadow: 0 0 5px var(--glow-color);
}

.mobile-menu-toggle.active .hamburger-line:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.mobile-menu-toggle.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active .hamburger-line:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

.mobile-nav {
    display: none;
    position: fixed;
    top: 70px;
    right: 15px;
    width: calc(100% - 30px);
    max-width: 300px;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border: 1px solid rgba(0, 255, 136, 0.3);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 10px 40px rgba(0, 255, 136, 0.2);
    z-index: 1000;
    animation: slideDown 0.3s ease-out;
}

.mobile-nav.active {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.mobile-nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    padding: 12px 15px;
    border-radius: 8px;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.mobile-nav-link:hover {
    color: var(--text-primary);
    background: rgba(0, 255, 136, 0.1);
    border-color: rgba(0, 255, 136, 0.3);
    text-shadow: 0 0 10px var(--glow-color);
    transform: translateX(5px);
}

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

/* Back Button */
.back-button {
    position: fixed;
    top: 20px;
    left: 20px;
    width: 45px;
    height: 45px;
    display: none; /* Скрыта по умолчанию */
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 255, 136, 0.3);
    border-radius: 50%;
    color: var(--text-primary);
    text-decoration: none;
    z-index: 1000;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 255, 136, 0.2);
}

.back-button svg {
    width: 24px;
    height: 24px;
    stroke: var(--text-primary);
    filter: drop-shadow(0 0 5px var(--glow-color));
    transition: all 0.3s ease;
}

.back-button:hover {
    background: rgba(0, 255, 136, 0.1);
    border-color: var(--text-primary);
    box-shadow: 0 0 25px var(--glow-color);
    transform: translateX(-3px) scale(1.05);
}

.back-button:hover svg {
    filter: drop-shadow(0 0 10px var(--glow-color));
}

.back-button:active {
    transform: translateX(-3px) scale(0.95);
}

/* Terms Main */
.terms-main {
    padding: 40px 0 60px;
    position: relative;
    z-index: 1;
    min-height: 100vh;
}

.terms-card {
    border-radius: 20px;
    overflow: hidden;
    animation: fadeInUp 1s ease-out;
}

.card-header {
    background: linear-gradient(135deg, rgba(0, 255, 136, 0.15) 0%, rgba(168, 85, 247, 0.1) 100%);
    padding: 40px 30px;
    text-align: center;
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid rgba(0, 255, 136, 0.2);
}

.card-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%2300ff88' fill-opacity='0.05'%3E%3Ccircle cx='30' cy='30' r='2'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E") repeat;
    opacity: 0.5;
}

.card-header h1 {
    margin: 0;
    font-size: clamp(24px, 4vw, 36px);
    font-weight: 700;
    letter-spacing: -0.5px;
    position: relative;
    z-index: 1;
    color: #ffffff;
}

.card-header h1.gradient-text {
    color: #ffffff;
    -webkit-text-fill-color: #ffffff;
    background: none;
    animation: none;
}

.card-header .subtitle {
    margin-top: 10px;
    font-size: 18px;
    color: var(--text-secondary);
    font-weight: 400;
    position: relative;
    z-index: 1;
}

.card-content {
    padding: 40px;
    max-height: calc(100vh - 300px);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--text-primary) var(--bg-tertiary);
}

.card-content::-webkit-scrollbar {
    width: 8px;
}

.card-content::-webkit-scrollbar-track {
    background: var(--bg-tertiary);
    border-radius: 6px;
}

.card-content::-webkit-scrollbar-thumb {
    background: var(--text-primary);
    border-radius: 6px;
    border: 2px solid var(--bg-tertiary);
    box-shadow: 0 0 10px var(--glow-color);
}

.card-content::-webkit-scrollbar-thumb:hover {
    background: var(--accent-hover);
}

.section {
    margin-bottom: 32px;
    padding: 24px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 12px;
    border: 1px solid rgba(0, 255, 136, 0.1);
    transition: all 0.3s ease;
    counter-increment: section-counter;
}

.section:hover {
    border-color: var(--text-primary);
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.15);
    background: rgba(255, 255, 255, 0.03);
}

.card-content {
    counter-reset: section-counter;
}

.section h2 {
    color: #ffffff;
    font-size: 22px;
    margin: 0 0 16px 0;
    font-weight: 600;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--text-accent);
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
}

.section h2::before {
    content: counter(section-counter);
    background: var(--text-accent);
    color: var(--bg-primary);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    flex-shrink: 0;
    box-shadow: 0 0 15px var(--glow-color);
}

.section p {
    color: var(--text-secondary);
    font-size: 15px;
    line-height: 1.8;
    margin: 0 0 16px 0;
    text-align: justify;
}

.section p:last-child {
    margin-bottom: 0;
}

.section p strong {
    color: #ffffff;
    font-weight: 600;
}

.section ol, .section ul {
    padding-left: 24px;
    margin: 16px 0;
    color: var(--text-secondary);
}

.section li {
    margin-bottom: 10px;
    line-height: 1.7;
    position: relative;
}

.section li::marker {
    color: var(--text-primary);
    font-weight: 600;
}

.warning-box {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.15) 0%, rgba(245, 158, 11, 0.1) 100%);
    border: 1px solid rgba(245, 158, 11, 0.4);
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.warning-box::before {
    content: '⚠️';
    position: absolute;
    top: 20px;
    left: 20px;
    font-size: 24px;
}

.warning-box .warning-content {
    margin-left: 50px;
    font-weight: 500;
    color: var(--text-secondary);
    line-height: 1.7;
}

.warning-box .warning-content strong {
    color: var(--warning-color);
    text-shadow: 0 0 10px rgba(245, 158, 11, 0.5);
}

.danger-box {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.15) 0%, rgba(239, 68, 68, 0.1) 100%);
    border: 1px solid rgba(239, 68, 68, 0.4);
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.danger-box::before {
    content: '🚫';
    position: absolute;
    top: 20px;
    left: 20px;
    font-size: 24px;
}

.danger-box .danger-content {
    margin-left: 50px;
    font-weight: 500;
    color: var(--text-secondary);
    line-height: 1.7;
}

.danger-box .danger-content strong {
    color: var(--danger-color);
    text-shadow: 0 0 10px rgba(239, 68, 68, 0.5);
}

a {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    position: relative;
    transition: all 0.3s ease;
    border-bottom: 1px solid transparent;
    text-shadow: 0 0 5px var(--glow-color);
}

a:hover {
    color: var(--text-secondary);
    border-bottom-color: var(--text-primary);
    text-shadow: 0 0 10px var(--glow-color);
}

.card-footer {
    border-top: 1px solid rgba(0, 255, 136, 0.2);
    padding: 30px;
    background: rgba(0, 0, 0, 0.3);
    text-align: center;
}

.acceptance-notice {
    font-size: 18px;
    color: #ffffff;
    font-weight: 600;
    margin: 0 0 20px 0;
    padding: 20px;
    background: rgba(0, 255, 136, 0.1);
    border-radius: 12px;
    border: 1px solid var(--text-accent);
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.2);
}

.document-meta {
    font-size: 14px;
    color: var(--text-muted);
    margin: 0;
}

/* Footer */
.footer {
    padding: 60px 0 30px;
    background: rgba(0, 0, 0, 0.9);
    border-top: 1px solid rgba(0, 255, 136, 0.2);
    position: relative;
    z-index: 1;
    backdrop-filter: blur(20px);
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    margin-bottom: 40px;
}

.footer-brand {
    animation: fadeInUp 1s ease-out;
}

.footer-tagline {
    color: var(--text-secondary);
    margin-top: 10px;
    font-size: 14px;
}

.footer-links {
    display: flex;
    gap: 40px;
    animation: fadeInUp 1s ease-out 0.2s both;
}

.footer-section {
    flex: 1;
}

.footer-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 20px;
    color: #ffffff;
}

.footer-link {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-secondary);
    text-decoration: none;
    margin-bottom: 15px;
    transition: all 0.3s ease;
}

.footer-link:hover {
    color: #ffffff;
    transform: translateX(5px);
}

.footer-icon {
    width: 20px;
    height: 20px;
    stroke-width: 2;
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(0, 255, 136, 0.1);
    color: var(--text-muted);
    font-size: 14px;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 968px) {
    .back-button {
        width: 40px;
        height: 40px;
        top: 15px;
        left: 15px;
    }

    .back-button svg {
        width: 20px;
        height: 20px;
    }

    .card-content {
        padding: 30px 20px;
        max-height: calc(100vh - 200px);
    }

    .section {
        padding: 20px;
        margin-bottom: 24px;
    }

    .section h2 {
        font-size: 20px;
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .section h2::before {
        align-self: flex-start;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }
}

@media (max-width: 640px) {
    /* Header - уменьшенный */
    .header {
        padding: 12px 0;
    }

    .logo-image {
        width: 28px;
        height: 28px;
    }

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

    .logo-dot {
        width: 8px;
        height: 8px;
    }

    /* Скрываем обычную навигацию на мобильных */
    .nav {
        display: none;
    }

    /* Показываем кнопку-гамбургер */
    .mobile-menu-toggle {
        display: flex;
    }

    /* Back button */
    .back-button {
        width: 36px;
        height: 36px;
        top: 10px;
        left: 10px;
    }

    .back-button svg {
        width: 18px;
        height: 18px;
    }

    /* Terms main */
    .terms-main {
        padding: 20px 0 40px;
    }

    /* Card */
    .card-header {
        padding: 25px 15px;
    }

    .card-header h1 {
        font-size: 20px;
    }

    .card-header .subtitle {
        font-size: 14px;
        margin-top: 8px;
    }

    .card-content {
        padding: 20px 15px;
        max-height: calc(100vh - 150px);
    }

    .section {
        padding: 16px 12px;
        margin-bottom: 20px;
    }

    .section h2 {
        font-size: 18px;
        padding-bottom: 10px;
        margin-bottom: 12px;
    }

    .section h2::before {
        width: 28px;
        height: 28px;
        font-size: 13px;
    }

    .section p {
        font-size: 14px;
        text-align: left;
        line-height: 1.6;
        margin-bottom: 12px;
    }

    .section ul,
    .section ol {
        padding-left: 20px;
        margin: 12px 0;
    }

    .section li {
        font-size: 14px;
        margin-bottom: 8px;
    }

    /* Warning and danger boxes */
    .warning-box,
    .danger-box {
        padding: 12px;
        margin: 15px 0;
    }

    .warning-box::before,
    .danger-box::before {
        top: 12px;
        left: 12px;
        font-size: 18px;
    }

    .warning-box .warning-content,
    .danger-box .danger-content {
        margin-left: 35px;
        font-size: 13px;
        line-height: 1.6;
    }

    /* Footer */
    .card-footer {
        padding: 20px 15px;
    }

    .acceptance-notice {
        font-size: 15px;
        padding: 15px;
        margin-bottom: 15px;
    }

    .document-meta {
        font-size: 12px;
    }

    /* Footer page */
    .footer {
        padding: 40px 0 20px;
    }

    .footer-content {
        gap: 30px;
    }

    .footer-title {
        font-size: 16px;
    }

    .footer-link {
        font-size: 13px;
    }

    .card-content::-webkit-scrollbar {
        width: 4px;
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
