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

:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-card: #16161f;
    --bg-input: #1a1a24;
    --text-primary: #ffffff;
    --text-secondary: #a0a0b0;
    --text-muted: #6b6b7b;
    --accent-primary: #667eea;
    --accent-secondary: #764ba2;
    --accent-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --error: #ef4444;
    --success: #22c55e;
    --warning: #f59e0b;
    --border-color: #2a2a3a;
    --shadow-lg: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 40px rgba(102, 126, 234, 0.15);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
}

.background-effects {
    position: fixed;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 0;
}

.gradient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.4;
}

.orb-1 {
    width: 600px;
    height: 600px;
    background: var(--accent-primary);
    top: -200px;
    right: -200px;
    animation: float 20s ease-in-out infinite;
}

.orb-2 {
    width: 400px;
    height: 400px;
    background: var(--accent-secondary);
    bottom: -100px;
    left: -100px;
    animation: float 15s ease-in-out infinite reverse;
}

.orb-3 {
    width: 300px;
    height: 300px;
    background: #4f46e5;
    top: 50%;
    left: 50%;
    animation: float 18s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(50px, -50px) scale(1.1); }
    50% { transform: translate(0, 50px) scale(0.9); }
    75% { transform: translate(-50px, -25px) scale(1.05); }
}

.vpn-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: linear-gradient(90deg, rgba(245, 158, 11, 0.15), rgba(245, 158, 11, 0.05));
    border-bottom: 1px solid rgba(245, 158, 11, 0.3);
    backdrop-filter: blur(10px);
    z-index: 100;
    padding: 12px 20px;
}

.vpn-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 14px;
    color: var(--warning);
    font-weight: 500;
}

.vpn-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.main-container {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 100px 20px 40px;
    gap: 40px;
}

/* Floating bubbles for images */
.floating-bubble {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    z-index: 2;
    animation: bubble-float 8s ease-in-out infinite;
}

.bubble-left {
    left: 3%;
    top: 25%;
    animation-delay: 0s;
}

.bubble-right {
    right: 3%;
    top: 55%;
    animation-delay: 2s;
}

.bubble-content {
    width: 280px;
    height: 280px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4), 0 0 40px rgba(102, 126, 234, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.3s ease;
}

.bubble-content:hover {
    transform: scale(1.05);
}

.bubble-content.rounded-square {
    border-radius: 24px;
}

.bubble-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.bubble-content:hover .bubble-img {
    transform: scale(1.1);
}

.bubble-caption {
    max-width: 260px;
    font-size: 13px;
    line-height: 1.5;
    color: var(--text-secondary);
    text-align: center;
    background: rgba(22, 22, 31, 0.9);
    padding: 10px 14px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    backdrop-filter: blur(10px);
}

.caption-above {
    margin-bottom: 8px;
}

.caption-below {
    margin-top: 8px;
}

@keyframes bubble-float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    25% { transform: translateY(-15px) rotate(1deg); }
    50% { transform: translateY(0) rotate(0deg); }
    75% { transform: translateY(15px) rotate(-1deg); }
}

@media (max-width: 1400px) {
    .bubble-content {
        width: 220px;
        height: 220px;
    }

    .bubble-caption {
        max-width: 220px;
        font-size: 12px;
    }
}

@media (max-width: 1100px) {
    .bubble-content {
        width: 180px;
        height: 180px;
    }

    .bubble-caption {
        max-width: 180px;
        font-size: 11px;
    }

    .bubble-left {
        left: 1%;
    }

    .bubble-right {
        right: 1%;
    }
}

@media (max-width: 900px) {
    .floating-bubble {
        display: none;
    }
}

.brand-section {
    text-align: center;
    max-width: 480px;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 12px;
    text-decoration: none;
}

.logo-img {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    object-fit: cover;
}

.logo h1 {
    font-family: 'Pacifico', cursive;
    font-size: 40px;
    font-weight: 400;
    color: #ffffff;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.tagline {
    color: var(--text-secondary);
    font-size: 16px;
    margin-bottom: 32px;
}

.features {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
}

.feature {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 100px;
    font-size: 13px;
    color: var(--text-secondary);
}

.feature svg {
    width: 16px;
    height: 16px;
    color: var(--accent-primary);
}

.auth-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 40px;
    width: 100%;
    max-width: 420px;
    box-shadow: var(--shadow-lg), var(--shadow-glow);
    backdrop-filter: blur(20px);
}

.auth-header {
    text-align: center;
    margin-bottom: 28px;
}

.auth-header h2 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 8px;
}

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

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.input-group label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 14px;
    width: 18px;
    height: 18px;
    color: var(--text-muted);
    pointer-events: none;
}

.input-wrapper input {
    width: 100%;
    padding: 14px 14px 14px 44px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 15px;
    transition: all 0.2s ease;
}

.input-wrapper input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.input-wrapper input::placeholder {
    color: var(--text-muted);
}

.toggle-password {
    position: absolute;
    right: 14px;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.toggle-password:hover {
    color: var(--text-secondary);
}

.toggle-password svg {
    width: 18px;
    height: 18px;
}

.form-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13px;
}

.checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    color: var(--text-secondary);
}

.checkbox-wrapper input {
    display: none;
}

.checkmark {
    width: 18px;
    height: 18px;
    border: 2px solid var(--border-color);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.checkmark::after {
    content: '';
    width: 10px;
    height: 10px;
    background: var(--accent-primary);
    border-radius: 2px;
    opacity: 0;
    transform: scale(0);
    transition: all 0.2s;
}

.checkbox-wrapper input:checked + .checkmark {
    border-color: var(--accent-primary);
}

.checkbox-wrapper input:checked + .checkmark::after {
    opacity: 1;
    transform: scale(1);
}

.forgot-link {
    color: var(--accent-primary);
    text-decoration: none;
    transition: opacity 0.2s;
}

.forgot-link:hover {
    opacity: 0.8;
}

.auth-button {
    position: relative;
    width: 100%;
    padding: 14px 24px;
    background: var(--accent-gradient);
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.3s ease;
}

.auth-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
}

.auth-button:active {
    transform: translateY(0);
}

.auth-button.loading .btn-text {
    opacity: 0;
}

.auth-button.loading .btn-loader {
    opacity: 1;
}

.btn-loader {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s;
}

.btn-loader::after {
    content: '';
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 24px 0;
    color: var(--text-muted);
    font-size: 13px;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-color);
}

.social-auth {
    display: flex;
    gap: 12px;
}

.social-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.social-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--text-muted);
}

.social-btn svg {
    width: 20px;
    height: 20px;
}

.server-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
    font-size: 12px;
    color: var(--text-muted);
}

.status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.status-indicator.online {
    background: var(--success);
}

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

.latency {
    font-family: monospace;
    color: var(--accent-primary);
}

.stats-bar {
    display: flex;
    gap: 40px;
    padding: 20px 40px;
    background: rgba(22, 22, 31, 0.8);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    backdrop-filter: blur(10px);
}

/* Visits statistics chart */
.visits-stats {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 32px 40px;
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(10px);
    text-align: center;
}

.visits-stats h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 24px;
    color: var(--text-primary);
}

.chart-container {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 40px;
    height: 200px;
    margin-bottom: 16px;
}

.chart-bar {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    width: 80px;
}

.bar-fill {
    width: 60px;
    height: calc(var(--value) / var(--max) * 160px);
    background: var(--accent-gradient);
    border-radius: 12px 12px 4px 4px;
    position: relative;
    transition: all 0.3s ease;
    animation: bar-grow 1s ease-out;
}

.bar-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 30%;
    background: linear-gradient(180deg, rgba(255,255,255,0.3) 0%, transparent 100%);
    border-radius: 12px 12px 0 0;
}

@keyframes bar-grow {
    from { height: 0; }
    to { height: calc(var(--value) / var(--max) * 160px); }
}

.bar-value {
    font-size: 14px;
    font-weight: 600;
    color: var(--accent-primary);
}

.bar-label {
    font-size: 12px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stats-note {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 8px;
}

@media (max-width: 640px) {
    .visits-stats {
        padding: 24px 20px;
    }

    .chart-container {
        gap: 20px;
        height: 160px;
    }

    .chart-bar {
        width: 60px;
    }

    .bar-fill {
        width: 40px;
        height: calc(var(--value) / var(--max) * 120px);
    }

    @keyframes bar-grow {
        from { height: 0; }
        to { height: calc(var(--value) / var(--max) * 120px); }
    }
}

.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.stat-value {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
}

.stat-label {
    font-size: 12px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.footer {
    position: relative;
    z-index: 1;
    padding: 30px 20px;
    text-align: center;
    border-top: 1px solid var(--border-color);
}

.footer p {
    color: var(--text-muted);
    font-size: 13px;
    margin-bottom: 12px;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 24px;
}

.footer-links a {
    color: var(--text-secondary);
    font-size: 13px;
    text-decoration: none;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--accent-primary);
}

.social-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

.social-label {
    color: var(--text-muted);
    font-size: 13px;
    margin-right: 4px;
}

.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    text-decoration: none;
    transition: all 0.2s ease;
    overflow: hidden;
}

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

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

.social-link.vk {
    background: #0077FF;
    color: white;
}

.social-link.vk:hover {
    background: #3390FF;
    transform: translateY(-2px);
}

.social-link.max {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.social-link.max:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.social-link.max .social-icon {
    width: 32px;
    height: 16px;
}

@media (max-width: 640px) {
    .auth-card {
        padding: 30px 24px;
    }

    .stats-bar {
        flex-direction: column;
        gap: 20px;
        width: 100%;
        max-width: 300px;
    }

    .social-auth {
        flex-direction: column;
    }

    .logo h1 {
        font-size: 24px;
    }

    .features {
        flex-direction: column;
        align-items: center;
    }

    .feature {
        width: 100%;
        justify-content: center;
    }
}
