/* Базовые стили */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --bg-color: #ffffff;
    --sidebar-bg: #f8fafc;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --border-color: #e5e7eb;
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    background-color: var(--bg-color);
    color: var(--text-primary);
}

/* Главная страница */
.landing-page {
    min-height: 100vh;
}

.landing-header {
    background: white;
    padding: 1rem 2rem;
    border-bottom: 1px solid var(--border-color);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

.landing-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.landing-logo h1 {
    color: var(--primary-color);
    font-size: 1.5rem;
    margin: 0;
}

.hero-section {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: white;
    padding: 8rem 2rem 4rem;
    text-align: center;
    margin-top: 60px;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    line-height: 1.6;
}

.auth-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 2rem;
}

.btn-hero {
    background: white;
    color: var(--primary-color);
    padding: 1rem 2rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn-hero:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.btn-hero-outline {
    background: transparent;
    color: white;
    border: 2px solid white;
}

.btn-hero-outline:hover {
    background: white;
    color: var(--primary-color);
}

/* Секции */
.section {
    padding: 4rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

/* Карточки */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
}

.feature-card {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    text-align: center;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

/* Футер */
.landing-footer {
    background: var(--sidebar-bg);
    padding: 3rem 2rem;
    margin-top: 4rem;
    border-top: 1px solid var(--border-color);
}

/* Боковое меню */
.sidebar {
    width: 260px;
    background: var(--sidebar-bg);
    border-right: 1px solid var(--border-color);
    padding: 1.5rem 0;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    z-index: 1000;
}

.logo {
    padding: 0 1.5rem 2rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 1.5rem;
}

.logo h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.nav-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0 1rem;
    flex: 1;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    text-decoration: none;
    color: var(--text-secondary);
    border-radius: 8px;
    transition: all 0.2s ease;
    font-weight: 500;
}

.nav-link:hover {
    background: white;
    color: var(--primary-color);
    box-shadow: var(--shadow);
}

.nav-link.active {
    background: white;
    color: var(--primary-color);
    box-shadow: var(--shadow);
}

/* Основной контент */
.main-content {
    flex: 1;
    margin-left: 260px;
    min-height: 100vh;
}

.top-bar {
    background: white;
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

.search-bar {
    position: relative;
    width: 400px;
}

.search-bar input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.5rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.2s ease;
}

.search-bar input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.search-bar::before {
    content: "🔎︎";
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* Зона контента */
.content {
    padding: 2rem;
    max-width: 1200px;
}

.page-header {
    margin-bottom: 2rem;
}

.page-header h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.page-header p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* Карточки */
.card {
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
}

.card:hover {
    box-shadow: var(--shadow-lg);
}

.card-content {
    padding: 1.5rem;
}

/* Кнопки */
.btn {
    background: var(--primary-color);
    color: white;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.2s ease;
}

.btn:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

.btn-outline:hover {
    background: #f9fafb;
    border-color: var(--text-secondary);
}

.btn-danger {
    background: #dc3545;
}

.btn-danger:hover {
    background: #c82333;
}

/* Формы */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-primary);
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.2s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
    font-family: inherit;
}

/* Фото профиля */
.profile-photo {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid white;
    box-shadow: var(--shadow-lg);
}

/* Сетка */
.grid {
    display: grid;
    gap: 1.5rem;
}

.grid-cols-1 {
    grid-template-columns: repeat(1, 1fr);
}

.grid-cols-2 {
    grid-template-columns: repeat(2, 1fr);
}

.grid-cols-3 {
    grid-template-columns: repeat(3, 1fr);
}

/* Карточки проектов */
.project-card {
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    padding: 1.5rem;
    transition: all 0.2s ease;
    cursor: pointer;
}

.project-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.project-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.project-card p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.5;
}

.project-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.project-category {
    background: #eff6ff;
    color: var(--primary-color);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.project-date {
    color: var(--text-secondary);
    font-size: 12px;
}

/* Флеш сообщения */
.flash-messages {
    margin-bottom: 1.5rem;
}

.flash-message {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.flash-success {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.flash-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

/* Пустые состояния */
.empty-state {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--text-secondary);
}

/* Мобильное нижнее меню */
.mobile-bottom-nav {
    display: none;
}

/* Мобильная версия */
@media (max-width: 768px) {

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .section-title {
        font-size: 1.75rem;
    }

    .cta-title {
        font-size: 2rem;
    }

    .steps-grid {
        grid-template-columns: 1fr;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .hero-section {
        padding: 6rem 1rem 3rem;
        margin-top: 50px;
    }

    .section {
        padding: 2rem 1rem;
    }

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

    .btn-hero {
        width: 200px;
    }

    /* Боковое меню и контент */
    .sidebar {
        display: none !important;
    }

    .mobile-bottom-nav {
        display: block;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        height: 60px;
        background: white;
        border-top: 1px solid var(--border-color);
        z-index: 1000;
    }

    .mobile-bottom-nav .nav-items {
        display: flex;
        justify-content: space-around;
        align-items: center;
        height: 100%;
    }

    .mobile-bottom-nav .nav-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-decoration: none;
        color: var(--text-secondary);
        flex: 1;
    }

    .mobile-bottom-nav .nav-item.active {
        color: var(--primary-color);
    }

    .mobile-bottom-nav .nav-item i {
        font-size: 20px;
        margin-bottom: 4px;
    }

    .mobile-bottom-nav .nav-item span {
        font-size: 10px;
    }

    /* Адаптация контента */
    .main-content {
        margin-left: 0 !important;
        padding-bottom: 60px !important;
    }

    .top-bar {
        padding: 1rem;
    }

    .search-bar {
        width: 100%;
    }

    .content {
        padding: 1rem;
    }

    .user-menu {
        display: none !important;
    }

    /* Сетка */
    .grid-cols-2,
    .grid-cols-3 {
        grid-template-columns: 1fr !important;
    }

    /* Карточки проектов */
    .project-card {
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    .landing-header {
        padding: 0.8rem 1rem;
    }

    .landing-logo h1 {
        font-size: 1.2rem;
    }

    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
    }

    .hero-title {
        font-size: 1.75rem;
    }
}

/* Планшеты */
@media (min-width: 769px) and (max-width: 1024px) {
    .sidebar {
        width: 80px;
    }

    .sidebar .logo h1,
    .nav-link span {
        display: none;
    }

    .main-content {
        margin-left: 80px;
    }

    .nav-link {
        justify-content: center;
        padding: 0.75rem;
    }

    .search-bar {
        width: 300px;
    }

    .grid-cols-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Кнопки в хедере */
.btn {
    padding: 0.6rem 1.5rem;
    border-radius: 6px;
    font-weight: 500;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    display: inline-block;
}

.btn-outline {
    background: transparent;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
}

.btn-outline:hover {
    background: var(--primary-color);
    color: white;
}

.btn {
    background: var(--primary-color);
    color: white;
    border: 1px solid var(--primary-color);
}

.btn:hover {
    background: var(--primary-hover);
    border-color: var(--primary-hover);
}

/* Секция "Почему TeamEasy?" */
#features.section {
    background-color: var(--sidebar-bg);
    border-radius: 12px;
    margin: 2rem auto; /* Изменено с margin: 2rem 0 */
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1.5rem;
}

.feature-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.feature-description {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Секция "Как это работает?" */
.section-subtitle {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 3rem;
    font-size: 1.1rem;
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.step-card {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    text-align: center;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.step-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.step-title {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.step-description {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Секция CTA */
.cta-section {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: white;
    padding: 4rem 2rem;
    border-radius: 12px;
    text-align: center;
    margin: 2rem auto;
    max-width: 800px;
}

.cta-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.cta-description {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Футер */
.footer-content {
    text-align: center;
    max-width: 1200px;
    margin: 0 auto;
}

.footer-logo {
    color: var(--primary-color);
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.footer-tagline {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-size: 1rem;
}

.footer-copyright {
    color: var(--text-secondary);
    font-size: 0.9rem;
    opacity: 0.8;
}