body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #0f1419 0%, #1a2332 50%, #2d1b4e 100%);
    background-attachment: fixed;
    background-size: cover;
    margin: 0;
    padding: 20px;
    color: #e1e8ed;
    min-height: 100vh;
}

.container {
    max-width: 400px;
    margin: 30px auto;
    background: rgba(15, 20, 25, 0.95);
    border: 1px solid rgba(74, 144, 226, 0.3);
    padding: 30px;
    border-radius: 12px;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.6),
        0 0 20px rgba(74, 144, 226, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

h1 {
    color: #b8d4f0;
    text-align: center;
    margin-bottom: 25px;
    font-size: 24px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}

.server-name {
    color: #64b5f6; /* Fallback цвет */
    background: linear-gradient(135deg, #42a5f5 0%, #64b5f6 50%, #90caf9 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: bold;
    font-size: 1.1em;
    text-shadow: 0 0 10px rgba(100, 181, 246, 0.6);
    display: inline-block;
    position: relative;
    animation: lichKingGlow 3s ease-in-out infinite alternate;
    letter-spacing: 0.8px;
}

@keyframes lichKingGlow {
    0% {
        filter: drop-shadow(0 0 8px rgba(66, 165, 245, 0.6));
        text-shadow: 0 0 10px rgba(100, 181, 246, 0.4);
    }
    50% {
        filter: drop-shadow(0 0 15px rgba(100, 181, 246, 0.8));
        text-shadow: 0 0 20px rgba(144, 202, 249, 0.6);
    }
    100% {
        filter: drop-shadow(0 0 12px rgba(144, 202, 249, 0.7));
        text-shadow: 0 0 15px rgba(66, 165, 245, 0.5);
    }
}

.realmlist-warning {
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.15) 0%, rgba(255, 235, 59, 0.1) 100%);
    color: #ffeb3b;
    padding: 12px 15px;
    margin-bottom: 10px;
    border-radius: 6px;
    border: 1px solid rgba(255, 235, 59, 0.3);
    box-shadow: 0 4px 12px rgba(255, 193, 7, 0.2);
    font-weight: bold;
    text-align: center;
    font-size: 16px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

.alert {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 6px;
    font-size: 14px;
    backdrop-filter: blur(5px);
    border: 1px solid;
}

.alert-danger {
    background: linear-gradient(135deg, rgba(244, 67, 54, 0.15) 0%, rgba(211, 47, 47, 0.1) 100%);
    color: #ff8a80;
    border-color: rgba(244, 67, 54, 0.3);
    box-shadow: 0 4px 12px rgba(244, 67, 54, 0.2);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

.alert-success {
    background: linear-gradient(135deg, rgba(67, 160, 71, 0.15) 0%, rgba(46, 125, 50, 0.1) 100%);
    color: #a5d6a7;
    border-color: rgba(67, 160, 71, 0.3);
    box-shadow: 0 4px 12px rgba(67, 160, 71, 0.2);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

.alert code {
    background: rgba(0, 0, 0, 0.3);
    color: #90caf9;
    padding: 4px 8px;
    border-radius: 4px;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 13px;
    border: 1px solid rgba(144, 202, 249, 0.3);
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.4);
    font-weight: bold;
}

.connection-guide {
    margin-top: 15px;
    border-top: 1px solid rgba(255, 138, 128, 0.2);
    padding-top: 12px;
}

.connection-guide summary {
    cursor: pointer;
    padding: 8px 0;
    font-weight: bold;
    color: #ffab91;
    font-size: 14px;
    outline: none;
    user-select: none;
    transition: all 0.2s ease;
}

.connection-guide summary:hover {
    color: #ffcc02;
    text-shadow: 0 0 5px rgba(255, 171, 145, 0.4);
}

.connection-guide[open] summary {
    color: #ffcc02;
    margin-bottom: 10px;
}

.guide-content {
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.guide-content ol {
    margin: 0;
    padding-left: 20px;
    color: #ff8a80;
}

.guide-content li {
    margin-bottom: 12px;
    line-height: 1.5;
    font-size: 13px;
}

.guide-content li.important {
    background: rgba(255, 193, 7, 0.1);
    border-left: 3px solid #ffcc02;
    padding: 8px 12px;
    margin: 12px 0;
    border-radius: 4px;
    color: #ffeb3b;
}

.guide-content code {
    background: rgba(0, 0, 0, 0.4);
    color: #81c784;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 12px;
    border: 1px solid rgba(129, 199, 132, 0.3);
}

.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 15px;
    color: #b8d4f0;
    font-weight: 500;
}

input[type="text"],
input[type="email"],
input[type="password"] {
    width: 100%;
    padding: 12px;
    margin-top: 6px;
    background: rgba(15, 20, 25, 0.6);
    border: 1px solid rgba(74, 144, 226, 0.3);
    border-radius: 6px;
    color: #e1e8ed;
    font-size: 14px;
    font-family: inherit;
    transition: all 0.3s ease;
    box-sizing: border-box;
    height: 48px;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus {
    outline: none;
    border-color: #64b5f6;
    box-shadow: 0 0 0 2px rgba(100, 181, 246, 0.2);
    background: rgba(15, 20, 25, 0.8);
}

input[type="text"]::placeholder,
input[type="email"]::placeholder,
input[type="password"]::placeholder {
    color: #7a8fa3;
}

.captcha-container {
    margin: 15px 0;
    text-align: left;
}

.captcha-container label {
    color: #b8d4f0;
    font-weight: 500;
    margin-bottom: 8px;
    display: block;
}

.captcha-display {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(144, 202, 249, 0.3);
    border-radius: 6px;
    padding: 10px;
    margin-bottom: 10px;
    text-align: center;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

.captcha-code {
    font-size: 20px;
    letter-spacing: 3px;
    font-weight: bold;
    color: #90caf9;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    text-shadow: 0 0 8px rgba(144, 202, 249, 0.4);
    margin: 0;
}

button {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #42a5f5 0%, #1976d2 100%);
    color: #ffffff;
    border: 1px solid rgba(66, 165, 245, 0.4);
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
    box-shadow: 
        0 4px 12px rgba(66, 165, 245, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

button:hover {
    background: linear-gradient(135deg, #64b5f6 0%, #1976d2 100%);
    transform: translateY(-2px);
    box-shadow: 
        0 6px 16px rgba(66, 165, 245, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

button:active {
    transform: translateY(0);
    box-shadow: 
        0 2px 8px rgba(66, 165, 245, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.login-link {
    text-align: center;
    margin-top: 20px;
    font-size: 14px;
}

.login-link a {
    color: #64b5f6;
    text-decoration: none;
    transition: all 0.2s ease;
}

.login-link a:hover {
    color: #90caf9;
    text-shadow: 0 0 5px rgba(100, 181, 246, 0.4);
}

.login-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(74, 144, 226, 0.2);
    flex-wrap: wrap;
}

.login-links a {
    color: #64b5f6;
    text-decoration: none;
    transition: all 0.2s ease;
    font-weight: 500;
    padding: 8px 12px;
    border-radius: 6px;
    border: 1px solid rgba(100, 181, 246, 0.3);
}

.login-links a:hover {
    color: #90caf9;
    text-shadow: 0 0 5px rgba(100, 181, 246, 0.4);
    background: rgba(100, 181, 246, 0.1);
    border-color: rgba(100, 181, 246, 0.5);
}

.rules-checkbox {
    margin: 20px 0;
    text-align: center;
}

.rules-checkbox label {
    display: inline;
    margin-left: 5px;
    color: #b8d4f0;
}

.rules-checkbox a {
    color: #64b5f6;
    text-decoration: none;
    font-weight: 500;
    border-bottom: 1px dotted rgba(100, 181, 246, 0.6);
    transition: all 0.2s ease;
}

.rules-checkbox a:hover {
    color: #90caf9;
    border-bottom-color: rgba(144, 202, 249, 0.8);
    text-shadow: 0 0 5px rgba(100, 181, 246, 0.4);
    text-decoration: none;
}

input[type="checkbox"] {
    accent-color: #64b5f6;
    width: 16px;
    height: 16px;
}

.social-links {
    text-align: center;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid rgba(74, 144, 226, 0.2);
}

.social-links a {
    color: #64b5f6;
    text-decoration: none;
    margin: 0 10px;
    font-size: 13px;
    transition: all 0.2s ease;
}

.social-links a:hover {
    color: #90caf9;
    text-shadow: 0 0 5px rgba(100, 181, 246, 0.4);
} 

/* ==========================================================================
   ToS (Terms of Service) Page Styles
   ========================================================================== */

:root {
    --primary-dark: #0a1428;
    --secondary-dark: #0f1c35;
    --accent-blue: #2563eb;
    --accent-light: #3b82f6;
    --text-primary: #e2e8f0;
    --text-secondary: #94a3b8;
    --text-accent: #60a5fa;
    --border-color: #1e3a8a;
    --glass-bg: rgba(15, 28, 53, 0.8);
    --gradient-primary: linear-gradient(135deg, #1e3a8a 0%, #3730a3 100%);
    --gradient-secondary: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    --shadow-glow: 0 0 20px rgba(37, 99, 235, 0.3);
}

/* ToS Page Body */
.tos-page {
    font-family: 'Inter', sans-serif;
    background: var(--primary-dark);
    background-image: 
        radial-gradient(circle at 25% 25%, rgba(37, 99, 235, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 75% 75%, rgba(59, 130, 246, 0.08) 0%, transparent 50%),
        linear-gradient(45deg, transparent 49%, rgba(30, 58, 138, 0.03) 50%, transparent 51%);
    color: var(--text-primary);
    line-height: 1.7;
    min-height: 100vh;
    overflow-x: hidden;
    scroll-behavior: smooth;
    margin: 0;
    padding: 0;
}

/* Animated background particles */
.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}

.particle {
    position: absolute;
    width: 2px;
    height: 2px;
    background: var(--text-accent);
    border-radius: 50%;
    opacity: 0.6;
    animation: float 20s infinite linear;
}

@keyframes float {
    0% { transform: translateY(100vh) translateX(0px); opacity: 0; }
    10% { opacity: 0.6; }
    90% { opacity: 0.6; }
    100% { transform: translateY(-100px) translateX(100px); opacity: 0; }
}

/* ToS Container */
.tos-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    position: relative;
    z-index: 1;
}

/* ToS Header */
.tos-header {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 3rem 2rem;
    margin-bottom: 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-glow), 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    animation: slideInDown 0.8s ease-out;
}

.tos-header::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-primary);
    border-radius: 24px 24px 0 0;
}

.tos-header::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-primary);
    border-radius: 0 0 24px 24px;
}

.tos-page h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 50%, #2563eb 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
    from { filter: drop-shadow(0 0 20px rgba(96, 165, 250, 0.3)); }
    to { filter: drop-shadow(0 0 30px rgba(96, 165, 250, 0.6)); }
}

.last-update {
    font-size: 1.1rem;
    color: var(--text-secondary);
    font-weight: 300;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.last-update i {
    color: var(--text-accent);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.tos-content {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 3rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-glow), 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    position: relative;
    animation: slideInUp 0.8s ease-out;
    transition: all 0.3s ease;
}

.tos-content:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-glow), 0 35px 60px -12px rgba(0, 0, 0, 0.6);
}

.tos-page h2 {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 600;
    color: var(--text-accent);
    margin: 2rem 0 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
    position: relative;
    animation: fadeInLeft 0.8s ease-out;
}

.tos-page h2::before {
    content: "";
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 60px;
    height: 2px;
    background: var(--gradient-primary);
    transition: width 0.3s ease;
}

.tos-page h2:hover::before {
    width: 120px;
}

.tos-page h3 {
    font-size: clamp(1.2rem, 2.5vw, 1.5rem);
    font-weight: 500;
    color: var(--text-primary);
    margin: 1.5rem 0 1rem;
    opacity: 0.9;
}

.tos-page p {
    margin-bottom: 1.5rem;
    text-align: justify;
    opacity: 0.9;
    font-size: 1rem;
    line-height: 1.8;
    animation: fadeIn 1s ease-out;
}

.tos-page ul {
    padding-left: 0;
    margin-bottom: 2rem;
    list-style: none;
}

.tos-page li {
    margin-bottom: 1rem;
    position: relative;
    padding-left: 2rem;
    transition: transform 0.2s ease;
}

.tos-page li:hover {
    transform: translateX(5px);
}

.tos-page li::before {
    content: "→";
    color: var(--text-accent);
    position: absolute;
    left: 0;
    font-weight: bold;
    transition: transform 0.2s ease;
}

.tos-page li:hover::before {
    transform: translateX(3px);
}

.tos-page .highlight {
    background: var(--glass-bg);
    border-left: 4px solid var(--accent-light);
    padding: 1.5rem;
    margin: 2rem 0;
    border-radius: 0 16px 16px 0;
    box-shadow: 0 10px 25px rgba(37, 99, 235, 0.1);
    position: relative;
    overflow: hidden;
    animation: slideInRight 0.8s ease-out;
}

.tos-page .highlight::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--gradient-primary);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateY(-100%); }
    100% { transform: translateY(100vh); }
}

.tos-page .contact-info {
    background: var(--glass-bg);
    border: 1px solid var(--border-color);
    padding: 1.5rem;
    border-radius: 16px;
    margin: 2rem 0;
    font-weight: 500;
    color: var(--text-accent);
    text-align: center;
    box-shadow: var(--shadow-glow);
    position: relative;
    overflow: hidden;
    animation: fadeInUp 0.8s ease-out;
}

.tos-page .contact-info::before {
    content: "📧";
    display: block;
    font-size: 2rem;
    margin-bottom: 0.5rem;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

.tos-page .warning {
    background: rgba(220, 38, 38, 0.1);
    border-left: 4px solid #dc2626;
    padding: 1.5rem;
    margin: 2rem 0;
    border-radius: 0 16px 16px 0;
    box-shadow: 0 10px 25px rgba(220, 38, 38, 0.1);
    position: relative;
    animation: slideInLeft 0.8s ease-out;
}

.tos-page .warning::before {
    content: "⚠️";
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 1.5rem;
    animation: warning-pulse 1.5s infinite;
}

@keyframes warning-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.1); }
}

.tos-page .term {
    color: var(--text-accent);
    font-weight: 600;
    background: linear-gradient(135deg, var(--text-accent), var(--accent-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.tos-footer {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--text-secondary);
    font-size: 1rem;
    border-top: 1px solid var(--border-color);
    margin-top: 2rem;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border-radius: 24px 24px 0 0;
    animation: fadeIn 1s ease-out;
}

.tos-footer p {
    margin-bottom: 0.5rem;
}

.tos-footer i {
    color: var(--text-accent);
    margin: 0 0.5rem;
    animation: pulse 2s infinite;
}

.tos-scroll-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    color: var(--text-accent);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    width: 60px;
    height: 60px;
    cursor: pointer;
    font-size: 1.5rem;
    box-shadow: var(--shadow-glow);
    transition: all 0.3s ease;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.tos-scroll-top:hover {
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 20px 40px rgba(37, 99, 235, 0.4);
    background: var(--accent-blue);
    color: white;
}

.tos-page .divider {
    height: 2px;
    background: linear-gradient(to right, transparent, var(--accent-light), transparent);
    margin: 3rem 0;
    position: relative;
    animation: fadeIn 1s ease-out;
}

.tos-page .divider::after {
    content: "✦";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--primary-dark);
    color: var(--text-accent);
    padding: 0 1rem;
    font-size: 1.2rem;
    animation: rotate 4s linear infinite;
}

@keyframes rotate {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Animation keyframes */
@keyframes slideInDown {
    from { opacity: 0; transform: translateY(-50px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideInUp {
    from { opacity: 0; transform: translateY(50px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-50px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(50px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInLeft {
    from { opacity: 0; transform: translateX(-30px); }
    to { opacity: 1; transform: translateX(0); }
}

/* ToS Responsive Design */
@media (max-width: 768px) {
    .tos-container {
        padding: 1rem;
    }
    
    .tos-header, .tos-content {
        padding: 2rem 1.5rem;
        margin-bottom: 1.5rem;
    }
    
    .tos-page h1 {
        font-size: 2rem;
    }
    
    .tos-scroll-top {
        bottom: 1rem;
        right: 1rem;
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
    
    .tos-page .divider {
        margin: 2rem 0;
    }
    
    .tos-footer {
        padding: 2rem 1rem;
    }
    
    .tos-page .highlight, .tos-page .warning, .tos-page .contact-info {
        padding: 1rem;
        margin: 1.5rem 0;
    }
    
    .tos-page li {
        padding-left: 1.5rem;
    }
}

@media (max-width: 480px) {
    .tos-container {
        padding: 0.5rem;
    }
    
    .tos-header, .tos-content {
        padding: 1.5rem 1rem;
        border-radius: 16px;
    }
    
    .tos-footer {
        padding: 1.5rem 1rem;
        border-radius: 16px 16px 0 0;
    }
}

/* Smooth scrolling and performance */
.tos-page * {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Custom scrollbar for ToS page */
.tos-page ::-webkit-scrollbar {
    width: 8px;
}

.tos-page ::-webkit-scrollbar-track {
    background: var(--primary-dark);
}

.tos-page ::-webkit-scrollbar-thumb {
    background: var(--accent-blue);
    border-radius: 4px;
}

.tos-page ::-webkit-scrollbar-thumb:hover {
    background: var(--accent-light);
}

/* Reduced motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    .tos-page *, .tos-page *::before, .tos-page *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}