:root {
    --bg-color: #121212;
    --surface-color: #1e1e24;
    --accent-color: #2ecc71;
    --text-main: #ffffff;
    --text-muted: #aaaaaa;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    width: 100%;
}

/* Навигация */
header {
    background-color: rgba(30, 30, 36, 0.95);
    backdrop-filter: blur(10px);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    border-bottom: 2px solid var(--accent-color);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 15px 20px;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 25px;
}

.nav-links a {
    color: var(--text-main);
    text-decoration: none;
    font-weight: 500;
}

.login-btn {
    background: var(--accent-color);
    color: #000;
    padding: 8px 16px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: bold;
}

/* Секции и Центровка */
section {
    padding: 100px 20px;
    max-width: 1200px;
    margin: 0 auto; /* Центрирует саму секцию */
    display: flex;
    flex-direction: column;
    align-items: center; /* Центрирует заголовок */
}

section h2 {
    font-size: 2.5rem;
    margin-bottom: 40px;
    text-align: center;
}

/* Сетка (Исправлено смещение) */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
    width: 100%; /* Занимает всю ширину секции */
    justify-content: center; /* Центрирует карточки внутри, если их мало */
}

/* КАРТОЧКА (единый стиль для всего) */
.card {
    background: var(--surface-color);
    padding: 25px;
    border-radius: 12px;
    border: 1px solid #333;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s, border-color 0.3s;
    min-height: 220px;
}

.card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-color);
}

.card h3 {
    margin-bottom: 15px;
    color: var(--accent-color);
}

.card p {
    color: var(--text-muted);
    flex-grow: 1; /* Чтобы футер всегда был внизу */
}

.card-footer {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #333;
    font-weight: bold;
    font-size: 0.9rem;
    text-transform: uppercase;
}

/* Hero */
#hero {
    height: 100vh;
    background: radial-gradient(circle at center, #2a2a35 0%, #121212 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    max-width: 100%;
}

#hero h1 {
    font-size: 5rem;
    letter-spacing: 5px;
    color: var(--text-main);
    text-shadow: 0 0 30px rgba(46, 204, 113, 0.4);
    /* Возвращаем анимацию */
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-15px); }
}
/* Анимации */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.8s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

footer {
    text-align: center;
    padding: 50px;
    border-top: 1px solid #333;
    color: var(--text-muted);
}