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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1a1c20 0%, #0f1114 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
}

.container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 20px;
}

header {
    background: #2D3037;
    border-radius: 8px;
    margin-bottom: 20px;
    padding: 20px 0;
    border-top: 3px solid #FD48B6;
    box-shadow: 0 -2px 10px rgba(253, 72, 182, 0.3), 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    width: 100%;
    max-width: 1600px;
    position: relative;
    z-index: 10000;
}

header:hover {
    box-shadow: 0 -2px 15px rgba(253, 72, 182, 0.5), 0 6px 20px rgba(0, 0, 0, 0.3);
    transform: translateY(-2px);
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

header h1 {
    color: #ffffff;
    font-size: 28px;
    letter-spacing: 1px;
}

header h1 a {
    color: #ffffff;
    text-decoration: none;
}

header nav {
    display: flex;
    gap: 25px;
}

header nav a {
    color: #e0e0e0;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

header nav a:hover {
    color: #FD48B6;
}

main {
    background: rgba(45, 48, 55, 0.6);
    border-radius: 8px;
    padding: 30px 0;
    margin-bottom: 20px;
    backdrop-filter: blur(10px);
    width: 100%;
    max-width: 1600px;
    position: relative;
    z-index: 1;
}

footer {
    background: #2D3037;
    border-radius: 8px;
    padding: 20px 0;
    width: 100%;
    max-width: 1600px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    margin-top: 20px;
}

footer .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    padding: 0 20px;
}

footer p {
    color: #a0a0a0;
}

footer .social-links a {
    color: #a0a0a0;
    text-decoration: none;
    margin: 0 8px;
    transition: color 0.3s ease;
}

footer .social-links a:hover {
    color: #FD48B6;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 30px;
}

.nav-divider {
    width: 1px;
    height: 30px;
    background: #6c757d;
    opacity: 0.5;
}

.header-right {
    display: flex;
    align-items: center;
}

.auth-buttons {
    display: flex;
    gap: 15px;
}

.login-btn {
    padding: 8px 20px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.3s ease;
    background: transparent;
    color: #e0e0e0;
    border: 1px solid #FD48B6;
    display: inline-flex;
    align-items: center;
    height: 36px;
}

.login-btn:hover {
    background: rgba(253, 72, 182, 0.2);
    transform: translateY(-2px);
}

.register-btn {
    padding: 8px 20px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.3s ease;
    background: #FD48B6;
    color: white;
    display: inline-flex;
    align-items: center;
    height: 36px;
}

.register-btn:hover {
    background: #e03a9e;
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(253, 72, 182, 0.4);
}

/* User menu styles */
.user-menu {
    display: flex;
    align-items: center;
    gap: 8px;
}

.profile-link {
    color: #FD48B6;
    font-weight: 600;
    font-size: 14px;
    padding: 0 12px;
    border-radius: 6px;
    background: rgba(253, 72, 182, 0.1);
    text-decoration: none;
    transition: all 0.3s ease;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    height: 36px;
}

.profile-link:hover {
    background: rgba(253, 72, 182, 0.2);
    transform: translateY(-1px);
}

.logout-form {
    margin: 0;
}

.logout-btn {
    background: transparent;
    color: #dc3545;
    border: 1px solid #dc3545;
    padding: 0 15px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.3s ease;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    height: 36px;
}

.logout-btn:hover {
    background: rgba(220, 53, 69, 0.2);
    transform: translateY(-2px);
}

/* Notifications styles */
.notifications-dropdown {
    position: relative;
    display: inline-flex;
    align-items: center;
    z-index: 10001;
}

.notifications-btn {
    background: rgba(253, 72, 182, 0.1);
    border: none;
    font-size: 18px;
    cursor: pointer;
    padding: 0 12px;
    border-radius: 6px;
    position: relative;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 36px;
    width: 40px;
}

.notifications-btn:hover {
    background: rgba(253, 72, 182, 0.2);
    transform: translateY(-1px);
}

.notifications-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #dc3545;
    color: white;
    font-size: 10px;
    font-weight: bold;
    padding: 2px 5px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
}

.notifications-menu {
    display: none;
    position: absolute;
    right: 0;
    top: 45px;
    background: #2D3037;
    min-width: 320px;
    max-width: 400px;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
    z-index: 999999 !important;
    border: 1px solid rgba(253, 72, 182, 0.2);
}

.notifications-menu.show {
    display: block;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.notifications-header {
    padding: 12px 15px;
    border-bottom: 1px solid rgba(253, 72, 182, 0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: bold;
    color: #FD48B6;
}

.mark-all-read {
    color: #28a745;
    font-size: 12px;
    text-decoration: none;
}

.mark-all-read:hover {
    text-decoration: underline;
}

.notifications-list {
    max-height: 400px;
    overflow-y: auto;
}

.notification-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 12px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    transition: background 0.2s ease;
    text-decoration: none;
}

.notification-item:hover {
    background: rgba(253,72,182,0.05);
}

.notification-item.unread {
    background: rgba(253,72,182,0.1);
    border-left: 3px solid #FD48B6;
}

.notification-icon {
    font-size: 20px;
    min-width: 35px;
    text-align: center;
}

.notification-content {
    flex: 1;
    min-width: 0;
}

.notification-title {
    color: #FD48B6;
    font-size: 13px;
    font-weight: bold;
    margin-bottom: 3px;
}

.notification-message {
    color: #e0e0e0;
    font-size: 12px;
    line-height: 1.3;
    margin-bottom: 3px;
    word-break: break-word;
}

.notification-time {
    color: #888;
    font-size: 10px;
}

/* Типы уведомлений */
.notification-item.type-success {
    border-left-color: #28a745;
}

.notification-item.type-warning {
    border-left-color: #ffc107;
}

.notification-item.type-error {
    border-left-color: #dc3545;
}

.notification-item.type-application {
    border-left-color: #FD48B6;
}

.notification-item.type-auction {
    border-left-color: #ff8c42;
}

.notification-item.type-forum {
    border-left-color: #17a2b8;
}

.notification-item.type-system {
    border-left-color: #6f42c1;
}

.notification-item.type-info {
    border-left-color: #17a2b8;
}

.no-notifications {
    padding: 30px;
    text-align: center;
    color: #888;
}

.notifications-footer {
    padding: 10px 15px;
    border-top: 1px solid rgba(253, 72, 182, 0.2);
    text-align: center;
}

.notifications-footer a {
    color: #FD48B6;
    text-decoration: none;
    font-size: 12px;
}

.notifications-footer a:hover {
    text-decoration: underline;
}

/* Сообщения */
.messages {
    margin-bottom: 20px;
}

.alert {
    padding: 12px 15px;
    border-radius: 6px;
    margin-bottom: 10px;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert-success {
    background: rgba(40, 167, 69, 0.2);
    border-left: 3px solid #28a745;
    color: #28a745;
}

.alert-error, .alert-danger {
    background: rgba(220, 53, 69, 0.2);
    border-left: 3px solid #dc3545;
    color: #dc3545;
}

.alert-warning {
    background: rgba(255, 193, 7, 0.2);
    border-left: 3px solid #ffc107;
    color: #ffc107;
}

.alert-info {
    background: rgba(23, 162, 184, 0.2);
    border-left: 3px solid #17a2b8;
    color: #17a2b8;
}

/* Форум */
.forum-layout,
.categorys,
.subcategories-block,
.subcategory-card {
    position: relative;
    z-index: 1;
}

.auth-container {
    max-width: 400px;
    margin: 50px auto;
    background: #2D3037;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.auth-container h2 {
    color: #ffffff;
    margin-bottom: 20px;
    text-align: center;
}

.auth-container .form-group {
    margin-bottom: 15px;
}

.auth-container .form-group label {
    display: block;
    color: #e0e0e0;
    margin-bottom: 5px;
    font-size: 14px;
}

.auth-container .form-group input {
    width: 100%;
    padding: 10px;
    background: #1a1c20;
    border: 1px solid rgba(253, 72, 182, 0.3);
    border-radius: 6px;
    color: #ffffff;
    font-size: 14px;
    box-sizing: border-box;
}

.auth-container .form-group input:focus {
    outline: none;
    border-color: #FD48B6;
}

.auth-container .help-text {
    font-size: 11px;
    color: #888;
    margin-top: 5px;
}

.auth-container .form-error {
    background: rgba(220, 53, 69, 0.2);
    color: #ff6b6b;
    padding: 8px;
    border-radius: 6px;
    margin-bottom: 15px;
    font-size: 13px;
    text-align: center;
}

.btn-submit {
    width: 100%;
    padding: 10px;
    background: #FD48B6;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-submit:hover {
    background: #e03a9e;
    transform: translateY(-2px);
}

.auth-container p {
    margin-top: 15px;
    text-align: center;
    color: #a0a0a0;
}

.auth-container a {
    color: #FD48B6;
    text-decoration: none;
}

.auth-container a:hover {
    text-decoration: underline;
}

.admin-link {
    color: #ffffff !important;
    font-weight: 600;
}

.admin-link:hover {
    color: #ffffff !important;
    text-shadow: 0 0 5px rgba(253, 72, 182, 0.5);
}

.post-author-link {
    color: #0066cc;
    text-decoration: none;
    transition: color 0.2s ease;
}

.post-author-link:hover {
    color: #004499;
    text-decoration: underline;
}

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

    header .container {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }

    .header-left {
        flex-direction: column;
        gap: 15px;
    }

    .nav-divider {
        display: none;
    }

    nav {
        flex-direction: row !important;
        justify-content: center;
        flex-wrap: wrap;
    }

    .header-right {
        justify-content: center;
    }

    .user-menu {
        justify-content: center;
        flex-wrap: wrap;
    }

    .profile-link, .logout-btn, .notifications-btn, .login-btn, .register-btn {
        height: 34px;
        font-size: 13px;
    }

    .notifications-btn {
        width: 38px;
        padding: 0 10px;
    }

    .profile-link {
        padding: 0 10px;
    }

    .logout-btn {
        padding: 0 12px;
    }

    footer .container {
        flex-direction: column;
        text-align: center;
    }
}
