:root {
    --primary: #2c3e50;
    --secondary: #3498db;
    --accent: #e74c3c;
    --light: #ecf0f1;
    --dark: #2c3e50;
}

html, body {
    height: 100%;
    font-family: 'Arial', sans-serif;
    margin: 0;
    padding: 0;
    color: var(--dark);
    line-height: 1.6;
}

/* Обёртка всего контента */
.page-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Основной контент растягивается */
.main-content {
    flex: 1;
}

header {
    background-color: var(--primary);
    color: white;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

/* Обновлённые стили шапки */
.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: white;
    text-decoration: none;
    transition: opacity 0.3s;
    letter-spacing: 0.5px;
}

.logo:hover {
    opacity: 0.9;
}

nav ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 1.5rem;
}

nav ul li {
    position: relative;
}

nav ul li a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    font-size: 1.1rem;
    transition: all 0.3s;
    padding: 0.5rem 0;
}

nav ul li a:hover {
    color: var(--secondary);
}

nav ul li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--secondary);
    transition: width 0.3s;
}

nav ul li a:hover::after {
    width: 100%;
}

/* Блок авторизации */
.auth-header-block {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-left: 1.5rem;
}

.auth-header-btn {
    padding: 0.6rem 1.2rem;
    border-radius: 6px;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s;
    text-decoration: none;
    text-align: center;
}

.login-header-btn {
    background-color: transparent;
    color: white;
    border: 2px solid white;
}

.login-header-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.register-header-btn {
    background-color: white;
    color: var(--primary);
    border: 2px solid white;
}

.register-header-btn:hover {
    background-color: rgba(255, 255, 255, 0.9);
    transform: translateY(-2px);
}

/* Меню пользователя */
.user-menu {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    cursor: pointer;
    position: relative;
    padding: 0.5rem 0;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--secondary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2rem;
    transition: transform 0.3s;
}

.username {
    color: white;
    font-weight: 500;
    transition: color 0.3s;
}

.user-menu:hover .user-avatar {
    transform: scale(1.05);
}

.user-menu:hover .username {
    color: var(--secondary);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    padding: 0.5rem 0;
    min-width: 180px;
    display: none;
    z-index: 100;
    animation: fadeIn 0.2s ease-out;
}

.user-menu:hover .dropdown-menu {
    display: unset
    ;
}

.dropdown-menu a {
    display: block;
    padding: 0.7rem 1.5rem;
    color: var(--dark);
    text-decoration: none;
    font-size: 0.95rem;
    transition: all 0.2s;
}

.dropdown-menu a:hover {
    background-color: #f5f5f5;
    color: var(--secondary);
    padding-left: 1.7rem;
}

/* Остальные ваши стили остаются без изменений */
.hero {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    padding: 8rem 0 4rem;
    text-align: center;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto 2rem;
}

.btn {
    display: inline-block;
    background-color: var(--accent);
    color: white;
    padding: 0.8rem 1.5rem;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s;
}

.btn:hover {
    background-color: #c0392b;
}

section {
    padding: 4rem 0;
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 2rem;
    color: var(--primary);
}

.services {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.service-card {
    background-color: white;
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
}

.service-card:hover {
    transform: translateY(-10px);
}

.service-card h3 {
    color: var(--secondary);
    margin-top: 0;
}

.advantages {
    background-color: var(--light);
}

.advantage-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.advantage-item {
    text-align: center;
    padding: 1.5rem;
}

.advantage-item img {
    width: 80px;
    height: 80px;
    margin-bottom: 1rem;
}

.contact-form {
    max-width: 600px;
    margin: 0 auto;
    background-color: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 95%;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-family: inherit;
}

.form-group textarea {
    height: 150px;
    resize: unset;
}

footer {
    background-color: var(--dark);
    color: white;
    padding: 2rem 0;
    text-align: center;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
}

.footer-section {
    flex: 1;
    min-width: 250px;
    margin-bottom: 1.5rem;
}

.footer-section h3 {
    margin-top: 0;
    color: var(--secondary);
}

.copyright {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Privacy Policy Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 10000;
    overflow-y: auto;
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 2rem;
    border-radius: 8px;
    width: 80%;
    max-width: 800px;
    max-height: 80vh;
    overflow-y: hidden;
    color: var(--dark);
}

.scroll-content {
    height: 100%;
    padding: 2rem;
    max-height: 80vh;
    overflow-y: auto;
    box-sizing: border-box;
}

.close-modal {
    float: right;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--accent);
}

html,
body {
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex: 1 0 auto;
}

/* 404 Page Styles */
.not-found {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
    text-align: center;
    flex-direction: column;
    padding: 60px 20px;
}

.error-content {
    max-width: 600px;
    margin: 0 auto;
}

.error-code {
    font-size: 96px;
    font-weight: bold;
    color: #e74c3c;
    margin-bottom: 20px;
}

.error-title {
    font-size: 32px;
    margin-bottom: 10px;
    color: #333;
}

.error-message {
    font-size: 18px;
    color: #666;
    margin-bottom: 30px;
}

/* Модальное окно статуса отправки */
.status-modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
}

.status-modal-content {
    background-color: white;
    padding: 2rem;
    border-radius: 8px;
    max-width: 500px;
    width: 90%;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    position: relative;
}

.close-status-modal {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--dark);
}

.status-modal-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #27ae60;
}

.status-modal-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--primary);
}

.status-modal-message {
    margin-bottom: 1.5rem;
}

/* Модальное окно авторизации */
.auth-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 10000;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease-out;
}

.auth-modal-content {
    background-color: white;
    padding: 2.5rem;
    border-radius: 10px;
    width: 90%;
    max-width: 420px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.3);
    position: relative;
    animation: slideDown 0.3s ease-out;
    margin: 20px;
}

.close-auth-modal {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 1.8rem;
    cursor: pointer;
    color: var(--dark);
    line-height: 1;
    transition: color 0.2s;
}

.close-auth-modal:hover {
    color: var(--accent);
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1.8rem;
    margin-top: 1.5rem;
}

.auth-form-group {
    display: flex;
    flex-direction: column;
    position: relative;
}

.auth-form-group label {
    margin-bottom: 0.7rem;
    font-weight: 600;
    color: var(--primary);
    font-size: 1.05rem;
}

.auth-form-group input {
    padding: 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.auth-form-group input:focus {
    border-color: var(--secondary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}

.auth-form-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.auth-btn {
    padding: 1rem 1.8rem;
    border-radius: 6px;
    font-weight: 600;
    transition: all 0.3s;
    cursor: pointer;
    border: none;
    font-size: 1rem;
    flex: 1;
    min-width: 120px;
    text-align: center;
}

.auth-submit {
    background-color: var(--accent);
    color: white;
}

.auth-submit:hover {
    background-color: #c0392b;
    transform: translateY(-2px);
}

.auth-link {
    color: var(--secondary);
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.2s;
    white-space: nowrap;
}

.auth-link:hover {
    color: #2980b9;
    text-decoration: underline;
}

.auth-error {
    color: #e74c3c;
    margin-top: 0.8rem;
    font-size: 0.95rem;
    padding: 0.5rem;
    background-color: rgba(231, 76, 60, 0.1);
    border-radius: 4px;
    border-left: 3px solid #e74c3c;
}

/* Анимации */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideDown {
    from {
        transform: translateY(-30px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Адаптация для мобильных */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
        padding: 1rem 0;
    }

    nav ul {
        margin-top: 1rem;
        justify-content: center;
        flex-wrap: wrap;
        gap: 1rem;
    }

    .auth-header-block {
        margin-left: 0;
        margin-top: 1rem;
        flex-direction: column;
        width: 100%;
        gap: 0.8rem;
    }

    .auth-header-btn {
        width: 100%;
        padding: 0.8rem;
    }

    .user-menu {
        flex-direction: column;
        align-items: center;
    }

    .dropdown-menu {
        right: auto;
        left: 50%;
        transform: translateX(-50%);
    }

    .hero {
        padding: 6rem 0 2rem;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .auth-modal-content {
        padding: 1.8rem 1.5rem;
        width: 95%;
    }

    .auth-form-group input {
        padding: 0.8rem;
    }

    .auth-btn {
        padding: 0.8rem 1rem;
    }

    .auth-form-actions {
        flex-direction: column;
        gap: 0.8rem;
    }

    .auth-link {
        margin-top: 0.5rem;
    }
}

/* Стили профиля */
.profile-container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 8rem;
}

.profile-header {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.profile-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background-color: var(--secondary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    font-weight: bold;
    flex-shrink: 0;
}

.profile-info h1 {
    margin: 0;
    color: var(--primary);
    font-size: 2rem;
}

.profile-info p {
    color: var(--dark);
    margin: 0.5rem 0 0;
}

.profile-tabs {
    display: flex;
    border-bottom: 1px solid #ddd;
    margin-bottom: 2rem;
}

.profile-tab {
    padding: 1rem 1.5rem;
    cursor: pointer;
    font-weight: 600;
    color: var(--dark);
    border-bottom: 3px solid transparent;
    transition: all 0.3s;
}

.profile-tab.active {
    color: var(--secondary);
    border-bottom-color: var(--secondary);
}

.profile-tab:hover:not(.active) {
    color: var(--primary);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease-out;
}

.profile-card {
    background-color: white;
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.profile-card h2 {
    margin-top: 0;
    color: var(--primary);
    font-size: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #eee;
}

.form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.form-group {
    flex: 1;
    min-width: 250px;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--dark);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--secondary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 2rem;
}

.btn {
    padding: 0.8rem 1.5rem;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    border: none;
}

.btn-primary {
    background-color: var(--secondary);
    color: white;
}

.btn-primary:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: #f0f0f0;
    color: var(--dark);
}

.btn-secondary:hover {
    background-color: #e0e0e0;
}

.btn-danger {
    background-color: #e74c3c;
    color: white;
}

.btn-danger:hover {
    background-color: #c0392b;
}

.notification-settings .form-group {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.notification-settings input[type="checkbox"] {
    width: auto;
}

.security-session {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border: 1px solid #eee;
    border-radius: 6px;
    margin-bottom: 1rem;
}

.security-session.current {
    background-color: rgba(52, 152, 219, 0.05);
    border-color: var(--secondary);
}

.session-info {
    flex: 1;
}

.session-info h4 {
    margin: 0 0 0.5rem;
    color: var(--primary);
}

.session-info p {
    margin: 0;
    color: var(--dark);
    font-size: 0.9rem;
}

.session-actions {
    margin-left: 1rem;
}

/* Анимации */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Адаптация для мобильных */
@media (max-width: 768px) {
    .profile-header {
        flex-direction: column;
        text-align: center;
    }

    .profile-tabs {
        overflow-x: auto;
        white-space: nowrap;
        padding-bottom: 0.5rem;
    }

    .form-row {
        flex-direction: column;
        gap: 1rem;
    }

    .form-actions {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }
}

/* стили формы регистрации */
.register-container {
    max-width: 600px;
    margin: 2rem auto;
    padding: 2rem;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.register-title {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 1.5rem;
}

.register-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group.full-width {
    grid-column: span 2;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    color: #34495e;
    font-weight: 500;
}


.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-primary {
    background: #3498db;
    color: white;
}

.btn-primary:hover {
    background: #2980b9;
}

.alert {
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1.5rem;
}

.alert.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.login-link {
    text-align: center;
    margin-top: 1.5rem;
    grid-column: span 2;
}

/* Адаптация для мобильных */
@media (max-width: 768px) {
    .auth-form {
        grid-template-columns: 1fr;
    }

    .form-group.full-width {
        grid-column: span 1;
    }
}
.input-error {
    border-color: #f44336 !important;
    background-color: #fff0f0;
}

.shake {
    animation: shake 0.3s;
}

@keyframes shake {
    0% { transform: translateX(0); }
    25% { transform: translateX(-4px); }
    50% { transform: translateX(4px); }
    75% { transform: translateX(-4px); }
    100% { transform: translateX(0); }
}

.validation-error {
    padding: 0.75rem 1rem;
    border: 1px solid #f44336;
    background-color: #ffeaea;
    border-radius: 4px;
    margin-bottom: 1rem;
    font-size: 0.95rem;
    color: #b71c1c;
}

.field-hint {
    color: #d32f2f;
    font-size: 0.85rem;
    margin-top: 4px;
    margin-bottom: 8px;
}