/* ================================
   Стили аутентификации для Талисманик.ру
   ================================ */

/* ================================
   Навигация сайта
   ================================ */
.site-nav {
    background: linear-gradient(135deg, #6d0c80 0%, #4a0859 100%);
    padding: 10px 20px;
    position: sticky !important;
    top: 0 !important;
    z-index: 10000 !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

/* Компактное меню на мобильных */
@media (max-width: 767px) {
    .site-nav {
        padding: 8px 12px !important;
    }
    
    .nav-container {
        padding: 0 !important;
    }
    
    .nav-logo {
        padding: 4px !important;
    }
    
    .nav-avatar {
        width: 28px !important;
        height: 28px !important;
    }
    
    .nav-user-btn {
        padding: 4px 8px !important;
    }
}

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

.nav-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-logo {
    color: #fff;
    display: flex;
    align-items: center;
    padding: 8px;
    border-radius: 8px;
    transition: background 0.3s;
}

.nav-logo:hover {
    background: rgba(255, 255, 255, 0.1);
}

.nav-link {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    font-size: 14px;
    padding: 8px 12px;
    border-radius: 6px;
    transition: all 0.3s;
}

.nav-link:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s;
}

.nav-btn-login {
    color: #fff;
    background: rgba(255, 255, 255, 0.15);
}

.nav-btn-login:hover {
    background: rgba(255, 255, 255, 0.25);
}

.nav-btn-register {
    color: #6d0c80;
    background: #fff;
}

.nav-btn-register:hover {
    background: #f0e6f3;
}

/* Меню пользователя */
.nav-user-menu {
    position: relative;
}

.nav-user-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.15);
    border: none;
    border-radius: 25px;
    cursor: pointer;
    color: #fff;
    transition: background 0.3s;
}

.nav-user-btn:hover {
    background: rgba(255, 255, 255, 0.25);
}

.nav-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.nav-username {
    font-size: 14px;
    font-weight: 500;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nav-chevron {
    transition: transform 0.3s;
}

.nav-dropdown.show + .nav-user-btn .nav-chevron,
.nav-user-btn:focus .nav-chevron {
    transform: rotate(180deg);
}

.nav-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 220px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s;
    z-index: 1001;
}

.nav-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-header {
    padding: 15px;
    background: linear-gradient(135deg, #6d0c80 0%, #4a0859 100%);
    border-radius: 12px 12px 0 0;
}

.dropdown-header strong {
    display: block;
    font-size: 14px;
    color: #ffffff;
    margin-bottom: 2px;
}

.dropdown-header span {
    display: block;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.9);
}

.dropdown-badge {
    display: inline-block;
    margin-top: 8px;
    padding: 3px 8px;
    font-size: 10px;
    font-weight: 600;
    border-radius: 10px;
    text-transform: uppercase;
}

.dropdown-badge.admin {
    background: rgba(255, 255, 255, 0.25);
    color: #ffffff;
}

.dropdown-divider {
    height: 1px;
    background: #eee;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 15px;
    color: #333333;
    text-decoration: none;
    font-size: 14px;
    transition: background 0.2s;
    border: none;
    background: none;
    width: 100%;
    cursor: pointer;
    text-align: left;
}

.dropdown-item:hover {
    background: #f5f5f5;
    color: #6d0c80;
}

.dropdown-item.logout {
    color: #e74c3c;
}

.dropdown-item.logout:hover {
    background: #fef5f5;
}

/* ================================
   Страницы аутентификации
   ================================ */
.auth-container {
    max-width: 440px;
    margin: 40px auto;
    padding: 0 20px;
}

.auth-card {
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(109, 12, 128, 0.1);
    overflow: hidden;
}

.auth-header {
    background: linear-gradient(135deg, #6d0c80 0%, #4a0859 100%);
    padding: 40px 30px;
    text-align: center;
    color: #fff;
}

.auth-icon {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.auth-icon svg {
    color: #fff;
}

.auth-header h2 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #fff;
}

.auth-header p {
    font-size: 14px;
    opacity: 0.8;
    color: #fff;
    margin: 0;
}

.auth-form {
    padding: 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    margin-bottom: 8px;
}

.input-with-icon {
    position: relative;
    display: flex;
    align-items: center;
}

.input-with-icon svg {
    position: absolute;
    left: 15px;
    color: #999;
    pointer-events: none;
}

.input-with-icon input {
    width: 100%;
    height: 50px;
    padding: 0 45px;
    border: 2px solid #e8e8e8;
    border-radius: 12px;
    font-size: 15px;
    transition: all 0.3s;
}

.input-with-icon input:focus {
    border-color: #6d0c80;
    box-shadow: 0 0 0 4px rgba(109, 12, 128, 0.1);
    outline: none;
}

.input-with-icon input::placeholder {
    color: #aaa;
}

.toggle-password {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    color: #999;
    transition: color 0.3s;
}

.toggle-password:hover {
    color: #6d0c80;
}

.form-group-inline {
    margin-bottom: 25px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 14px;
    color: #555;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #6d0c80;
}

.btn-auth-submit {
    width: 100%;
    height: 54px;
    background: linear-gradient(135deg, #6d0c80 0%, #4a0859 100%);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s;
}

.btn-auth-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(109, 12, 128, 0.35);
}

.btn-auth-submit:active {
    transform: translateY(0);
}

.auth-footer {
    padding: 20px 30px 30px;
    text-align: center;
    background: #f8f5fa;
}

.auth-footer p {
    font-size: 14px;
    color: #666;
    margin: 0;
}

.auth-footer a {
    color: #6d0c80;
    font-weight: 600;
    text-decoration: none;
}

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

/* Проверка пароля */
.password-strength,
.password-match {
    margin-top: 8px;
    font-size: 12px;
}

.strength-weak {
    color: #e74c3c;
}

.strength-medium {
    color: #f39c12;
}

.strength-strong {
    color: #27ae60;
}

.match-success {
    color: #27ae60;
}

.match-error {
    color: #e74c3c;
}

/* ================================
   Алерты
   ================================ */
.alert {
    padding: 15px 20px;
    border-radius: 10px;
    margin: 15px 30px;
    font-size: 14px;
}

.alert p {
    margin: 5px 0;
    line-height: 1.5;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* ================================
   Профиль пользователя
   ================================ */
.profile-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.profile-header-card {
    background: linear-gradient(135deg, #6d0c80 0%, #4a0859 100%);
    border-radius: 20px;
    padding: 40px;
    display: flex;
    align-items: center;
    gap: 30px;
    color: #fff;
    margin-bottom: 25px;
}

.profile-avatar {
    position: relative;
    flex-shrink: 0;
}

.profile-avatar img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 4px solid rgba(255, 255, 255, 0.3);
}

.admin-badge {
    position: absolute;
    bottom: 5px;
    right: 5px;
    width: 28px;
    height: 28px;
    background: #ffd700;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6d0c80;
}

.profile-info h2 {
    font-size: 28px;
    margin-bottom: 5px;
    color: #fff;
}

.profile-email {
    font-size: 14px;
    opacity: 0.8;
    margin-bottom: 5px;
    color: #fff !important;
}

.profile-date {
    font-size: 13px;
    opacity: 0.6;
    margin-bottom: 10px;
    color: #fff !important;
}

.role-badge {
    display: inline-block;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.role-badge.admin {
    background: #ffd700;
    color: #6d0c80;
}

.role-badge.user {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

/* Статистика */
.profile-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-bottom: 25px;
}

.stat-card {
    background: #fff;
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
}

.stat-icon {
    width: 50px;
    height: 50px;
    background: #f8f5fa;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
    color: #6d0c80;
}

.stat-icon.approved {
    background: #e8f5e9;
    color: #27ae60;
}

.stat-icon.pending {
    background: #fff8e1;
    color: #f39c12;
}

.stat-icon.reactions {
    background: #fce4ec;
    color: #e91e63;
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
    color: #333;
    line-height: 1;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 12px;
    color: #888;
}

/* Форма редактирования */
.profile-edit-card {
    background: #fff;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    margin-bottom: 25px;
}

.profile-edit-card h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    color: #333;
    margin-bottom: 25px;
}

.profile-edit-card h4 {
    font-size: 16px;
    color: #555;
    margin-bottom: 5px;
}

.form-hint {
    font-size: 13px;
    color: #888;
    margin-bottom: 20px;
}

.profile-form .form-group {
    margin-bottom: 20px;
}

.profile-form label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    margin-bottom: 8px;
}

.profile-form input {
    width: 100%;
    height: 48px;
    padding: 0 15px;
    border: 2px solid #e8e8e8;
    border-radius: 10px;
    font-size: 15px;
    transition: all 0.3s;
}

.profile-form input:focus {
    border-color: #6d0c80;
    box-shadow: 0 0 0 4px rgba(109, 12, 128, 0.1);
    outline: none;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.form-divider {
    border: none;
    border-top: 1px solid #eee;
    margin: 30px 0;
}

.form-actions {
    margin-top: 30px;
}

.btn-save {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 30px;
    background: linear-gradient(135deg, #6d0c80 0%, #4a0859 100%);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-save:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(109, 12, 128, 0.35);
}

/* Быстрые действия */
.profile-actions-card {
    background: #fff;
    border-radius: 20px;
    padding: 25px 30px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
}

.profile-actions-card h3 {
    font-size: 16px;
    color: #333;
    margin-bottom: 20px;
}

.action-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.action-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: #f8f5fa;
    color: #6d0c80;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s;
}

.action-btn:hover {
    background: #6d0c80;
    color: #fff;
}

.action-btn.logout {
    background: #fef5f5;
    color: #e74c3c;
}

.action-btn.logout:hover {
    background: #e74c3c;
    color: #fff;
}

.logout-form {
    display: inline;
}

/* ================================
   Адаптивность
   ================================ */
@media (max-width: 768px) {
    .hide-mobile {
        display: none !important;
    }
    
    .profile-header-card {
        flex-direction: column;
        text-align: center;
        padding: 30px 20px;
    }
    
    .profile-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .profile-avatar img {
        width: 100px;
        height: 100px;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .action-btn {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .auth-container {
        margin: 20px auto;
    }
    
    .auth-header {
        padding: 30px 20px;
    }
    
    .auth-form {
        padding: 20px;
    }
    
    .auth-footer {
        padding: 15px 20px 20px;
    }
    
    .stat-card {
        padding: 15px;
    }
    
    .stat-value {
        font-size: 22px;
    }
    
    .profile-edit-card,
    .profile-actions-card {
        padding: 20px;
    }
}
