body {
    margin: 0;
    padding: 0;
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #6a11cb, #2575fc);
    background-attachment: fixed;
    background-size: cover;
    color: white;
    overflow-x: hidden;
    min-height: 100vh;
}

.main-container {
    max-width: 1110px;
    margin: 20px auto;
    padding: 20px;
}

.settings-container {
    display: flex;
    min-height: calc(100vh - 120px);
    position: relative;
}

.settings-sidebar {
    width: 280px;
    background: rgba(255, 255, 255, 0.05);
    padding: 20px;
    transition: all 0.3s ease;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    overflow-y: auto;
    height: calc(100vh - 120px);
    position: sticky;
    top: 60px;
}

.settings-sidebar.collapsed {
    width: 80px;
    overflow: hidden;
}

.settings-sidebar.collapsed .sidebar-section-title,
.settings-sidebar.collapsed .sidebar-menu-item a span,
.settings-sidebar.collapsed .footer-link,
.settings-sidebar.collapsed .version-info {
    display: none;
}

.settings-sidebar.collapsed .sidebar-menu-item a {
    justify-content: center;
}

.settings-sidebar.collapsed .sidebar-menu-item i {
    margin-right: 0;
    font-size: 1.2rem;
}

.settings-content-wrapper {
    flex: 1;
    padding: 30px;
    transition: all 0.3s ease;
}

.settings-content-wrapper.sidebar-collapsed {
    margin-left: -200px;
}

.header-with-toggle {
    display: flex;
    align-items: center;
    margin-bottom: 30px;
}

.header-with-toggle h1 {
    color: white;
    font-size: 2rem;
    margin-left: 20px;
}

.sidebar-toggle {
    background: transparent;
    border: none;
    color: #ffcc00;
    font-size: 1.5rem;
    cursor: pointer;
    display: none;
}

.mobile-sidebar-toggle {
    display: none;
    background: transparent;
    border: none;
    color: #ffcc00;
    font-size: 1.5rem;
    cursor: pointer;
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 100;
}

/* Стили для сайдбара */
.sidebar-sections {
    margin-bottom: 30px;
}

.sidebar-section {
    margin-bottom: 25px;
}

.sidebar-section-title {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 15px;
    padding-left: 10px;
}

.sidebar-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-menu-item {
    margin-bottom: 5px;
}

.sidebar-menu-item a {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.sidebar-menu-item a:hover {
    background: rgba(255, 204, 0, 0.1);
}

.sidebar-menu-item.active a {
    background: linear-gradient(90deg, rgba(255, 204, 0, 0.2), transparent);
    border-left: 3px solid #ffcc00;
    color: #ffcc00;
}

.sidebar-menu-item i {
    margin-right: 12px;
    width: 20px;
    text-align: center;
}

.sidebar-footer {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-link {
    display: block;
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    margin-bottom: 10px;
    font-size: 0.9rem;
    transition: color 0.3s;
}

.footer-link:hover {
    color: #ffcc00;
}

.version-info {
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.8rem;
    margin-top: 15px;
}

/* Стили для контента настроек */
.settings-content {
    max-width: 800px;
    margin: 0 auto;
}

.settings-section {

    margin-bottom: 40px;
    animation: fadeIn 0.5s ease-out;
}

.settings-section-title {
    color: white;
    font-size: 1.5rem;
    margin-bottom: 25px;
    position: relative;
    padding-bottom: 10px;
}

.settings-section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #ffcc00, #ffaa00);
}

.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    margin-bottom: 15px;
    transition: all 0.3s ease;
}

.setting-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.setting-info {
    flex: 1;
}

.setting-title {
    color: white;
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.setting-description {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
}

.setting-control {
    margin-left: 20px;
}

.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.2);
    transition: .4s;
    border-radius: 24px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #ffcc00;
}

input:checked + .slider:before {
    transform: translateX(26px);
}

/* Стили для форм в настройках */
.settings-form {
    margin-top: 30px;
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    color: white;
    font-size: 1rem;
    margin-bottom: 10px;
    font-weight: 500;
}

.form-control {
    width: 95%;
    padding: 12px 15px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.2);
    color: white;
    font-size: 1rem;
    transition: all 0.3s ease;
    font-family: 'Poppins', sans-serif;
}

.form-control:focus {
    outline: none;
    border-color: #ffcc00;
    background: rgba(0, 0, 0, 0.3);
    box-shadow: 0 0 0 3px rgba(255, 204, 0, 0.2);
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    margin-top: 30px;
}

/* Адаптивность */
@media (max-width: 992px) {
    .settings-sidebar {
        position: fixed;
        left: -280px;
        top: 60px;
        height: calc(100vh - 60px);
        z-index: 90;
        background: rgba(0, 0, 0, 0.9);
        border-right: none;
    }

    .settings-sidebar.mobile-visible {
        left: 0;
    }

    .sidebar-toggle {
        display: block;
    }

    .mobile-sidebar-toggle {
        display: block;
    }

    .settings-content-wrapper {
        padding-left: 20px;
        padding-right: 20px;
    }
}

@media (max-width: 768px) {
    .setting-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .setting-control {
        margin-left: 0;
        margin-top: 15px;
        align-self: flex-end;
    }

    .form-actions {
        flex-direction: column;
    }

    .form-actions .btn {
        width: 100%;
    }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Profile Settings Specific Styles */
.avatar-control {
    display: flex;
    align-items: center;
    gap: 20px;
}

.avatar-preview {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.avatar-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.default-avatar {
    font-size: 2rem;
    color: rgba(255, 255, 255, 0.5);
}

.avatar-upload-button {
    padding: 8px 15px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: white;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.avatar-upload-button:hover {
    background: rgba(255, 255, 255, 0.2);
}

#id_avatar {
    display: none;
}

/* Form Rows */
.form-row {
    display: flex;
    gap: 20px;
}

.form-row .form-group {
    flex: 1;
}

@media (max-width: 768px) {
    .form-row {
        flex-direction: column;
        gap: 15px;
    }

    .avatar-control {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* Input Fields Styling */
.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    color: white;
    font-size: 1rem;
    margin-bottom: 8px;
    font-weight: 500;
}

.input-with-icon {
    position: relative;
}

.input-with-icon i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.7);
    font-size: 1rem;
}

.input-with-icon input,
.input-with-icon select,
.input-with-icon textarea {
    width: 100%;
    padding: 12px 15px 12px 40px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.2);
    color: white;
    font-size: 1rem;
    transition: all 0.3s ease;
    font-family: 'Poppins', sans-serif;
}

.input-with-icon input:focus,
.input-with-icon select:focus,
.input-with-icon textarea:focus {
    outline: none;
    border-color: #ffcc00;
    background: rgba(0, 0, 0, 0.3);
    box-shadow: 0 0 0 3px rgba(255, 204, 0, 0.2);
}

.input-with-icon textarea {
    min-height: 100px;
    resize: vertical;
}

/* Date Input Styling */
.input-with-icon input[type="date"] {
    appearance: none;
    -webkit-appearance: none;
    padding-right: 15px;
}

/* Select Dropdown Styling */
.input-with-icon select {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3e%3cpath d='M7 10l5 5 5-5z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 12px;
    padding-right: 35px;
}

/* Button Styling */
.cta-button {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-right: 40px;
}

.form-actions .cta-button{
    margin-right: 50px;
}


.cta-button.primary {
    background: linear-gradient(135deg, #ffcc00, #ffaa00);
    color: #6a11cb;
}

.cta-button.secondary {
    background: linear-gradient(135deg, #6a11cb, #2575fc);
    color: white;
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.cta-button:active {
    transform: translateY(0);
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    margin-top: 30px;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .form-actions {
        flex-direction: column;
    }

    .cta-button {
        width: 100%;
        justify-content: center;
    }
}

/* Display Fields (non-editable) */
.display-field {
    display: flex;
    align-items: center;
    padding: 12px 15px 12px 40px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.1);
    color: rgba(255, 255, 255, 0.7);
    font-size: 1rem;
    min-height: 46px;
    position: relative;
    width: 75%;
}

.display-field i {
    position: absolute;
    left: 15px;
    color: rgba(255, 255, 255, 0.7);
}

.display-field span {
    margin-left: 10px;
}

/* Form Rows */
.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.form-row .form-group {
    flex: 1;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .form-row {
        flex-direction: column;
        gap: 15px;
    }

    .form-actions {
        flex-direction: column;
    }

    .cta-button {
        width: 100%;
        justify-content: center;
    }
}

.input-with-icon input{
    width: 85%;
}

#id_first_name{
    width: 75%;
    height: 45px;
}

#id_last_name{
    width: 75%;
    height: 45px;
}

#id_email{
    width: 75%;
    height: 45px;
}

#id_birth_date{
    width: 75%;
    height: 45px;
}

#id_bio{
    width: 88%;
}

/* Главная страница настроек */
.settings-dashboard {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

/* Карточка профиля */
.user-profile-card {
    background: linear-gradient(135deg, rgba(106, 17, 203, 0.2), rgba(37, 117, 252, 0.2));
    border-radius: 16px;
    padding: 25px;
    margin-bottom: 30px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.profile-header {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.avatar-container {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    margin-right: 20px;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
}

.profile-avatar {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.default-avatar {
    font-size: 2.5rem;
    color: rgba(255, 255, 255, 0.6);
}

.profile-info h2 {
    color: white;
    margin: 0 0 5px 0;
    font-size: 1.5rem;
}

.member-since {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
    margin: 0;
}

.profile-stats {
    display: flex;
    justify-content: space-around;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
}

.stat-item {
    text-align: center;
}

.stat-value {
    display: block;
    font-size: 1.5rem;
    font-weight: bold;
    color: #ffcc00;
}

.stat-label {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
}

/* Быстрые настройки */
.quick-settings-section {
    margin-bottom: 40px;
}

.section-title {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.2rem;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.quick-settings-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.quick-setting {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.3s;
    text-decoration: none;
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.quick-setting:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-3px);
}

.setting-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.setting-content i {
    font-size: 1.2rem;
    color: #ffcc00;
}

.current-value {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
    margin-left: 5px;
}

/* Категории настроек */
.settings-category {
    margin-bottom: 30px;
}

.category-title {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.2rem;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.category-items {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.settings-item {
    display: flex;
    align-items: center;
    padding: 15px;
    text-decoration: none;
    color: white;
    transition: all 0.3s;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.settings-item:last-child {
    border-bottom: none;
}

.settings-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.item-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(106, 17, 203, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    font-size: 1rem;
    color: #ffcc00;
}

.item-info {
    flex: 1;
}

.item-title {
    display: block;
    font-size: 1rem;
    margin-bottom: 3px;
}

.item-desc {
    display: block;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
}

/* Переключатели */
.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.2);
    transition: .4s;
    border-radius: 24px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #ffcc00;
}

input:checked + .slider:before {
    transform: translateX(26px);
}

/* Адаптивность */
@media (max-width: 768px) {
    .quick-settings-grid {
        grid-template-columns: 1fr;
    }

    .profile-header {
        flex-direction: column;
        text-align: center;
    }

    .avatar-container {
        margin-right: 0;
        margin-bottom: 15px;
    }
}

    .badge {
        display: inline-block;
        padding: 4px 8px;
        border-radius: 12px;
        font-size: 0.8rem;
        font-weight: 600;
        margin-right: 10px;
    }

    .success-badge {
        background-color: rgba(40, 167, 69, 0.2);
        color: #28a745;
    }

    .warning-badge {
        background-color: rgba(255, 193, 7, 0.2);
        color: #ffc107;
    }

    .danger-zone {
        padding: 20px;
        background: rgba(255, 0, 0, 0.1);
        border: 1px solid rgba(255, 0, 0, 0.2);
        border-radius: 8px;
        margin-top: 20px;
        width: 85%;
    }

    .danger-zone-title {
        color: #ff4444;
        margin-bottom: 10px;
    }

    .danger-zone-description {
        color: rgba(255, 255, 255, 0.8);
        margin-bottom: 20px;
    }

    .password-requirements {
        margin-top: 10px;
        padding: 10px;
        background: rgba(0, 0, 0, 0.2);
        border-radius: 5px;
    }

    .password-requirements ul {
        margin: 5px 0 0 20px;
        padding: 0;
    }

    .password-requirements li {
        font-size: 0.85rem;
        color: rgba(255, 255, 255, 0.7);
    }
