/* Общие стили */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #5865F2;
    --primary-dark: #4752C4;
    --primary-light: #7289DA;
    --secondary-color: #57F287;
    --secondary-dark: #43D57A;
    --accent-color: #FF6B9D;
    --dark-bg: #1e2124;
    --darker-bg: #18191c;
    --card-bg: #2a2d31;
    --text-color: #FFFFFF;
    --text-secondary: #b9bbbe;
    --border-color: #40444b;
    --hover-color: #36393f;
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.4);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    background: var(--dark-bg);
    background-image: 
        radial-gradient(at 0% 0%, rgba(88, 101, 242, 0.1) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(87, 242, 135, 0.1) 0px, transparent 50%);
    background-attachment: fixed;
    color: var(--text-color);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Навигация */
.navbar {
    background: rgba(24, 25, 28, 0.9);
    backdrop-filter: blur(10px);
    padding: 1.25rem 0;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand h1 {
    font-size: 1.75rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 0.5rem;
    align-items: center;
}

.nav-menu a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.3s ease;
    padding: 0.625rem 1.25rem;
    border-radius: 8px;
    font-weight: 500;
    position: relative;
}

.nav-menu a::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--text-color);
    background: rgba(88, 101, 242, 0.1);
}

.nav-menu a.active::before,
.nav-menu a:hover::before {
    width: 80%;
}

.btn-auth {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark)) !important;
    color: var(--text-color) !important;
    padding: 0.625rem 1.5rem !important;
    box-shadow: 0 4px 15px rgba(88, 101, 242, 0.3);
}

.btn-auth:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(88, 101, 242, 0.4);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
}

.nav-toggle span {
    width: 28px;
    height: 3px;
    background: var(--text-color);
    border-radius: 3px;
    transition: all 0.3s;
}

/* Основной контент */
main {
    flex: 1;
    padding: 2rem 0;
}

/* Hero секция */
.hero {
    text-align: center;
    padding: 6rem 0 5rem;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(88, 101, 242, 0.15) 0%, transparent 70%);
    animation: pulse 8s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1) rotate(0deg); opacity: 0.5; }
    50% { transform: scale(1.1) rotate(180deg); opacity: 0.8; }
}

.hero .container {
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    font-weight: 800;
    letter-spacing: -2px;
    background: linear-gradient(135deg, #ffffff 0%, var(--primary-light) 50%, var(--secondary-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: fadeInUp 0.8s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.server-ip {
    font-size: 1.75rem;
    margin: 3rem 0 2rem;
    padding: 1.5rem 2.5rem;
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 16px;
    display: inline-block;
    box-shadow: var(--shadow);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.server-ip:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(88, 101, 242, 0.2);
}

.server-ip span {
    color: var(--secondary-color);
    font-weight: 700;
    font-family: 'Courier New', 'Consolas', monospace;
    text-shadow: 0 0 20px rgba(87, 242, 135, 0.5);
    letter-spacing: 1px;
}

/* Кнопки */
.btn {
    display: inline-block;
    padding: 1rem 2.5rem;
    margin: 0.75rem;
    text-decoration: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1.05rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: var(--text-color);
    box-shadow: 0 6px 20px rgba(88, 101, 242, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(88, 101, 242, 0.4);
}

.btn-success {
    background: linear-gradient(135deg, var(--secondary-color), var(--secondary-dark));
    color: #000;
    box-shadow: 0 6px 20px rgba(87, 242, 135, 0.3);
    font-weight: 700;
}

.btn-success:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(87, 242, 135, 0.4);
}

.btn-info {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: var(--text-color);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.3);
}

.btn-info:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(52, 152, 219, 0.4);
}

/* Features Preview */
.features-preview {
    padding: 6rem 0;
}

.features-preview h2 {
    text-align: center;
    font-size: 3rem;
    margin-bottom: 4rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--text-color), var(--primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: var(--card-bg);
    padding: 2.5rem;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    transform: scaleX(0);
    transition: transform 0.4s ease;
}

.feature-card:hover {
    transform: translateY(-10px) scale(1.02);
    border-color: var(--primary-color);
    box-shadow: 0 20px 60px rgba(88, 101, 242, 0.2);
}

.feature-card:hover::before {
    transform: scaleX(1);
}

.feature-card h3 {
    font-size: 1.75rem;
    margin-bottom: 1rem;
    color: var(--secondary-color);
    font-weight: 700;
}

.feature-card p {
    color: var(--text-secondary);
    font-size: 1.05rem;
    line-height: 1.7;
}

/* Статистика */
.stats {
    padding: 6rem 0;
    background: rgba(42, 45, 49, 0.5);
    backdrop-filter: blur(10px);
    position: relative;
}

.stats::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, transparent 0%, rgba(88, 101, 242, 0.05) 100%);
    pointer-events: none;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2.5rem;
    text-align: center;
    position: relative;
    z-index: 1;
}

.stat-item {
    padding: 2.5rem;
    background: var(--card-bg);
    border-radius: 20px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
}

.stat-item:hover {
    transform: translateY(-5px);
    border-color: var(--secondary-color);
    box-shadow: 0 15px 40px rgba(87, 242, 135, 0.2);
}

.stat-item h3 {
    font-size: 3.5rem;
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.75rem;
    font-weight: 800;
}

.stat-item p {
    color: var(--text-secondary);
    font-size: 1.15rem;
    font-weight: 500;
}

/* Страницы контента */
.content-page {
    max-width: 950px;
    margin: 0 auto;
    padding: 3rem 2rem;
}

.content-page h1 {
    font-size: 3.5rem;
    margin-bottom: 2.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -1px;
}

.content-page h2 {
    font-size: 2.25rem;
    margin-top: 3rem;
    margin-bottom: 1.5rem;
    color: var(--primary-light);
    font-weight: 700;
    border-left: 4px solid var(--primary-color);
    padding-left: 1.5rem;
}

.content-page h3 {
    font-size: 1.75rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--secondary-color);
    font-weight: 600;
}

.content-page p {
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
    line-height: 1.9;
    font-size: 1.1rem;
}

.content-page ul,
.content-page ol {
    margin-left: 2.5rem;
    margin-bottom: 2rem;
    color: var(--text-secondary);
}

.content-page li {
    margin-bottom: 0.75rem;
    line-height: 1.9;
    font-size: 1.05rem;
}

.content-page code {
    background: var(--card-bg);
    padding: 0.3rem 0.7rem;
    border-radius: 6px;
    font-family: 'Courier New', 'Consolas', monospace;
    color: var(--secondary-color);
    border: 1px solid var(--border-color);
}

/* Профиль */
.profile-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 3rem 2rem;
}

.profile-header {
    background: var(--card-bg);
    padding: 3rem;
    border-radius: 24px;
    margin-bottom: 2.5rem;
    display: flex;
    align-items: center;
    gap: 2.5rem;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
}

.profile-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 4px solid var(--primary-color);
    box-shadow: 0 8px 32px rgba(88, 101, 242, 0.3);
    object-fit: cover;
}

.profile-info h2 {
    color: var(--text-color);
    margin-bottom: 0.75rem;
    font-size: 2rem;
    font-weight: 700;
}

.profile-info p {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    font-size: 1.05rem;
}

.profile-roles {
    margin-top: 1.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.role-badge {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    color: var(--text-color);
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(88, 101, 242, 0.3);
}

.profile-section {
    background: var(--card-bg);
    padding: 2.5rem;
    border-radius: 20px;
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.profile-section h3 {
    color: var(--primary-light);
    margin-bottom: 1.5rem;
    font-size: 1.75rem;
    font-weight: 700;
}

.form-group {
    margin-bottom: 2rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.75rem;
    color: var(--text-color);
    font-weight: 600;
    font-size: 1.05rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    background: var(--darker-bg);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-color);
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(88, 101, 242, 0.1);
}

.form-group textarea {
    min-height: 180px;
    resize: vertical;
}

/* Заявка */
.application-status {
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    font-weight: 600;
    font-size: 1.1rem;
}

.application-status.pending {
    background: linear-gradient(135deg, #f39c12, #e67e22);
    color: #000;
    box-shadow: 0 6px 20px rgba(243, 156, 18, 0.3);
}

.application-status.approved {
    background: linear-gradient(135deg, var(--secondary-color), var(--secondary-dark));
    color: #000;
    box-shadow: 0 6px 20px rgba(87, 242, 135, 0.3);
}

.application-status.rejected {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: var(--text-color);
    box-shadow: 0 6px 20px rgba(231, 76, 60, 0.3);
}

/* Footer */
footer {
    background: var(--darker-bg);
    padding: 4rem 0 2rem;
    margin-top: auto;
    border-top: 1px solid var(--border-color);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-section h3,
.footer-section h4 {
    color: var(--primary-light);
    margin-bottom: 1.5rem;
    font-weight: 700;
    font-size: 1.3rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.75rem;
}

.footer-section a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
}

.footer-section a:hover {
    color: var(--primary-color);
    transform: translateX(5px);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-secondary);
}

/* Адаптивность */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background: rgba(24, 25, 28, 0.98);
        backdrop-filter: blur(20px);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: var(--shadow-lg);
        padding: 2rem 0;
        gap: 0;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-toggle {
        display: flex;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .server-ip {
        font-size: 1.4rem;
        padding: 1.25rem 2rem;
    }

    .profile-header {
        flex-direction: column;
        text-align: center;
        padding: 2rem;
    }

    .content-page {
        padding: 2rem 1.5rem;
    }

    .content-page h1 {
        font-size: 2.5rem;
    }

    .features-preview h2 {
        font-size: 2rem;
    }
}
