body {
    background: radial-gradient(ellipse at bottom, #df01014f 0%, #00000098 50%, #000000 100%);;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

* {
    -webkit-tap-highlight-color: transparent !important;
    -webkit-touch-callout: none !important;
}

body {
    background-color: #000;
    padding: 20px;
    font-family: Arial, sans-serif;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

#fire-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: radial-gradient(ellipse at bottom, #1a0000 0%, #000000 70%);
}

.header,
.buttons,
#profile-menu {
    position: relative;
    z-index: 1;
}

.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

.logo {
    border-radius: 30px;
    border: 3px solid rgba(255, 0, 0, 0.568);
    flex-shrink: 0;
}

.logo img {
    border-radius: 30px;
    width: 200px;
    height: auto;
    display: block;
}

.buttons {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
}

button {
    -webkit-tap-highlight-color: transparent !important;
    background: transparent;
    color: #ffffff;
    border: 2px solid #b90e0e46;
    padding: 12px 24px;
    border-radius: 24px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
    font-size: 14px;
}

button:focus,
button:focus-visible,
button:active {
    outline: none !important;
    box-shadow: none !important;
    -webkit-tap-highlight-color: transparent !important;
}

button:hover {
    background: transparent;
    color: #ffffff;
    transform: scale(1.05);
}

.google-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    width: 100%;
    justify-content: center;
    margin-top: 10px;
}

.google-btn:hover {
    background: #f1f1f100 !important;
    transform: scale(1.05);
}

.google-btn img {
    width: 20px;
    height: 20px;
}

*:focus,
*:focus-visible,
a:focus,
a:focus-visible,
[onclick]:focus,
[onclick]:focus-visible {
    outline: none !important;
    -webkit-tap-highlight-color: transparent !important;
}

#profile-menu {
    display: none;
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
}

#avatar-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 2px solid #b90e0e;
    padding: 0;
    cursor: pointer;
    overflow: hidden;
    background: #111;
    display: block;
}

#avatar-btn img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 50%;
}

#avatar-btn:hover {
    transform: scale(1.05);
    background: #111;
}

#profile-dropdown {
    display: none;
    position: absolute;
    top: 54px;
    right: 0;
    background: #111;
    border: 1px solid rgba(185, 14, 14, 0.6);
    border-radius: 10px;
    min-width: 200px;
    padding: 8px;
    backdrop-filter: blur(5px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

#profile-dropdown.open {
    display: block;
    animation: fadeIn 0.3s ease;
}

#profile-dropdown .profile-info {
    padding: 8px 12px 10px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 6px;
}

#profile-dropdown .profile-name {
    color: #fff;
    font-size: 13px;
    font-weight: bold;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#profile-dropdown .profile-email {
    color: #aaa;
    font-size: 11px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#profile-dropdown button {
    width: 100%;
    text-align: left;
    border: none;
    background: transparent;
    color: #fff;
    padding: 10px 12px;
    font-size: 13px;
    border-radius: 6px;
    font-weight: normal;
}

#profile-dropdown button:hover {
    background: rgba(185, 14, 14, 0.8);
    color: #fff;
    transform: none;
}

.trades-section {
    position: relative;
    z-index: 1;
    margin-top: 40px;
}

.trades-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 24px;
}

.trades-header h2 {
    color: #fff;
    font-size: 22px;
    letter-spacing: 0.5px;
}

#add-trade-btn {
    background: #b90e0e;
    color: #fff;
}

#add-trade-btn:hover {
    background: #ff1a1a;
    color: #fff;
}

.trades-grid {
    column-count: 3;
    column-gap: 18px;
    width: 100%;
}

.trades-grid .trade-card {
    break-inside: avoid;
    display: inline-block;
    width: 100%;
    margin-bottom: 18px;
    height: auto !important;
}

.trade-card {
    background: rgba(20, 0, 0, 0);
    border: 1px solid rgba(185, 14, 14, 0.5);
    border-radius: 14px;
    padding: 16px;
    backdrop-filter: blur(4px);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 10px;
    position: relative;
    overflow: hidden;
    will-change: transform, opacity;
    opacity: 0;
    transform: translateY(20px) scale(0.98);
    animation: fadeInUp 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
    transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.trade-card:nth-child(1) {
    animation-delay: 0.05s;
}
.trade-card:nth-child(2) {
    animation-delay: 0.10s;
}
.trade-card:nth-child(3) {
    animation-delay: 0.15s;
}
.trade-card:nth-child(4) {
    animation-delay: 0.20s;
}
.trade-card:nth-child(5) {
    animation-delay: 0.25s;
}
.trade-card:nth-child(6) {
    animation-delay: 0.30s;
}
.trade-card:nth-child(7) {
    animation-delay: 0.35s;
}
.trade-card:nth-child(8) {
    animation-delay: 0.40s;
}

@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(20px) scale(0.98);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.trade-card:hover {
    transform: translateY(-6px) scale(1.01);
    border-color: rgba(255, 50, 50, 0.8);
    box-shadow:
        0 0 20px rgba(185, 14, 14, 0.3),
        0 0 60px rgba(185, 14, 14, 0.1),
        inset 0 0 30px rgba(185, 14, 14, 0.05);
}

.trade-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg,
            transparent 30%,
            rgba(255, 255, 255, 0.03) 50%,
            transparent 70%);
    transform: rotate(45deg);
    transition: 0.6s;
    pointer-events: none;
}

.trade-card:hover::before {
    transform: rotate(45deg) translate(20%, 20%);
}

.weapon-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 6px;
    width: 100%;
    min-height: 80px;
    padding: 8px;
    background: transparent !important;
    border: 1px solid rgba(185, 14, 14, 0.3);
    margin-bottom: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.trade-card:hover .weapon-grid {
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.02);
}

.weapon-img {
    display: block;
    object-fit: contain;
    max-width: 80px;
    max-height: 80px;
    width: auto;
    height: auto;
    flex: 0 0 auto;
    border-radius: 6px;
    background: transparent;
    min-width: 40px;
    min-height: 40px;
    transition: all 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
    filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.1));
    will-change: transform, filter;
}

.weapon-img:hover {
    transform: scale(1.15) rotate(-3deg);
    filter: drop-shadow(0 0 15px rgba(185, 14, 14, 0.6));
    z-index: 2;
}

.trade-card .title-give {
    width: 100%;
    text-align: center;
    font-size: 20px;
    margin-bottom: 8px;
    margin-top: 4px;
    background: linear-gradient(135deg, #ff6b6b, #ff0000);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 30px rgba(255, 0, 0, 0.3);
    font-weight: 700;
    letter-spacing: 2px;
}

.trade-card .title-want {
    width: 100%;
    text-align: center;
    font-size: 20px;
    margin-top: 8px;
    margin-bottom: 8px;
    background: linear-gradient(135deg, #5bc0ff, #0088ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 30px rgba(0, 136, 255, 0.3);
    font-weight: 700;
    letter-spacing: 2px;
}

.trade-card .username {
    width: 100%;
    text-align: center;
    color: #ddd;
    font-size: 14px;
    margin-top: 4px;
    font-weight: 500;
    padding: 6px 0;
    border-radius: 8px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), transparent);
    border: 1px solid rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(4px);
    transition: all 0.3s ease;
    margin-bottom: 20px;
}

.trade-card:hover .username {
    border-color: rgba(255, 255, 255, 0.15);
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
}

.trade-card .delete-btn {
    background: #9e0b0b;
    border: none;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    margin-top: 4px;
    display: inline-block;
    width: auto;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1) !important;
    position: relative;
    overflow: hidden;
}

.trade-card .delete-btn:hover {
    background: #d42020;
    transform: scale(1.05) !important;
    color: white;
}

.delete-btn[style*="background:#8b0000"] {
    animation: pulseBtn 2s ease-in-out infinite;
}

.styleMOBILE {
    animation-name: styleMOBILE;
    animation-timing-function: ease;
    animation-duration: 3s;
    animation-iteration-count: infinite;
}

@keyframes styleMOBILE {
    0%, 100% {
        box-shadow: 0 0 0 0 rgb(139, 0, 0);
    }
    50% {
        box-shadow: 0 0 0 15px rgba(139, 0, 0, 0);
    }
}

.trades-empty {
    color: #999;
    font-size: 14px;
    width: 100%;
    text-align: center;
    padding: 40px 0;
    display: inline-block !important;
    break-inside: avoid;
    -webkit-column-break-inside: avoid;
    page-break-inside: avoid;
}

.trades-empty p {
    margin: 0;
}

/* ===== ИСПРАВЛЕННАЯ МОДАЛКА ===== */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow: hidden;
}

.modal-overlay.open {
    display: flex;
    animation: fadeIn 0.3s ease;
}

.modal-box {
    background: rgba(0, 0, 0, 0.548);
    border: 1px solid rgba(185, 14, 14, 0.7);
    border-radius: 14px;
    padding: 24px;
    width: 100%;
    max-width: 380px;
    max-height: 90vh;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.modal-box h3 {
    color: #fff;
    margin-bottom: 16px;
    font-size: 18px;
    flex-shrink: 0;
}

.modal-box label {
    display: block;
    color: #ccc;
    font-size: 12px;
    margin-bottom: 6px;
    margin-top: 12px;
}

.modal-box input,
.modal-box textarea {
    width: 100%;
    background: #1a1a1a;
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 13px;
    font-family: inherit;
}

.modal-box textarea {
    resize: vertical;
    min-height: 60px;
}

/* ===== ФОРМА В МОДАЛКЕ ===== */
#trade-form {
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
}

.form-step {
    flex: 1;
    overflow-y: auto;
    padding-right: 4px;
}

.form-step::-webkit-scrollbar {
    width: 4px;
}

.form-step::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

.form-step::-webkit-scrollbar-thumb {
    background: #b90e0e;
    border-radius: 4px;
}

#give-fields-container,
#want-fields-container {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    min-height: 40px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px dashed rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 8px;
    max-height: 120px;
    overflow-y: auto;
}

#give-fields-container::-webkit-scrollbar,
#want-fields-container::-webkit-scrollbar {
    width: 3px;
}

#give-fields-container::-webkit-scrollbar-thumb,
#want-fields-container::-webkit-scrollbar-thumb {
    background: #b90e0e;
    border-radius: 4px;
}

.modal-actions {
    display: flex;
    gap: 10px;
    margin-top: 16px;
    flex-shrink: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 12px;
}

.modal-actions button {
    flex: 1;
    padding: 10px;
    font-size: 13px;
    border-radius: 8px;
    cursor: pointer;
    transition: 0.3s;
    white-space: nowrap;
}

#modal-error {
    color: #ff6b6b;
    font-size: 12px;
    margin-top: 10px;
    display: none;
}

#modal-submit-btn {
    background: #b90e0e;
}

#modal-submit-btn:hover {
    background: #ff1a1a;
}

/* ===== ТЕМЫ ===== */
body.light-theme {
    background: #f0f0f0 !important;
}

body.light-theme #fire-bg {
    display: none !important;
}

body.light-theme .header .logo {
    border-color: rgba(0, 0, 0, 0.3);
}

body.light-theme .trades-header h2 {
    color: #000;
}

body.light-theme .trade-card {
    background: rgba(255, 255, 255, 0.85);
    border-color: rgba(0, 0, 0, 0.2);
    backdrop-filter: none;
}

body.light-theme .trade-card .title-give {
    background: linear-gradient(135deg, #cc0000, #ff3333);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

body.light-theme .trade-card .title-want {
    background: linear-gradient(135deg, #0066cc, #3399ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

body.light-theme .trade-card .username {
    color: #333;
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.1);
}

body.light-theme .weapon-grid {
    background: #f5f5f5;
    border-color: rgba(0, 0, 0, 0.15);
}

body.light-theme .trades-empty {
    color: #333;
}

body.light-theme .modal-box {
    background: #f5f5f5;
    border-color: rgba(0, 0, 0, 0.3);
}

body.light-theme .modal-box h3,
body.light-theme .modal-box label {
    color: #000;
}

body.light-theme .modal-box input {
    background: #fff;
    color: #000;
    border-color: rgba(0, 0, 0, 0.2);
}

body.no-animations .trade-card {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
}

body.no-animations .trade-card:hover {
    transform: scale(1.01) !important;
}

body.no-animations .weapon-img {
    transition: none !important;
}

body.no-animations .weapon-img:hover {
    transform: none !important;
}

body.no-animations .delete-btn {
    animation: none !important;
}

body.no-animations .delete-btn[style*="background:#8b0000"] {
    animation: none !important;
}

body.no-fire #fire-bg {
    display: none !important;
    background: #000 !important;
}

body.no-fire {
    background-color: #000 !important;
}

body.no-fire #fire-bg canvas {
    display: none !important;
}

/* ===== АДАПТИВ ===== */
@media (max-width: 768px) {
    .header {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }

    .buttons {
        width: 100%;
    }

    .loginloginlog {
        width: 100%;
    }

    .google-btn {
        width: 100%;
        justify-content: center;
    }

    .trades-grid {
        display: flex;
        flex-direction: column;
        gap: 16px;
        width: 100%;
        column-count: unset !important;
    }

    .trades-grid .trade-card {
        width: 100%;
        max-width: 100%;
        margin-bottom: 0;
        height: auto !important;
        display: flex;
        flex-direction: column;
    }

    .trade-card {
        padding: 16px;
        gap: 8px;
        border-radius: 14px;
    }

    .weapon-grid {
        min-height: 70px;
        padding: 6px;
        gap: 6px;
        border-radius: 10px;
        margin-bottom: 6px;
        background: transparent !important;
        border: 1px solid rgba(185, 14, 14, 0.3);
    }

    .weapon-img {
        max-width: 80px !important;
        max-height: 80px !important;
        min-width: 50px !important;
        min-height: 50px !important;
    }

    .trade-card .username {
        font-size: 14px;
        padding: 6px 0;
        border-radius: 6px;
    }

    .trade-card .delete-btn {
        font-size: 12px !important;
        padding: 5px 10px !important;
        border-radius: 20px;
    }

    .modal-box {
        max-width: 100%;
        max-height: 95vh;
        padding: 16px;
    }
}

@media (max-width: 360px) {
    .loginloginlog {
        background-color: rgba(17, 17, 17, 0.829);
        border: 2px solid rgba(255, 255, 255, 0.397);
        width: 110px;
        height: 40px;
        font-size: 12px;
        display: block;
        justify-content: center;
        text-align: center;
        margin: 0 auto;
        font-family: Arial, Helvetica, sans-serif;
        animation-name: login;
        animation-iteration-count: infinite;
        animation-direction: alternate;
        animation-duration: 3s;
        animation-timing-function: ease-in;
    }
}

/* ===== ОСТАЛЬНЫЕ МОДАЛКИ ===== */
.modalFeedback {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    z-index: 3000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modalFeedback.open {
    display: flex;
    animation: fadeIn 0.3s ease;
}

.modal-icon200 {
    background: rgba(0, 0, 0, 0.63);
    border: 2px solid rgba(255, 0, 0, 0.363);
    border-radius: 20px;
    padding: 24px;
    width: 100%;
    max-width: 380px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
}

.modal-icon200 h3 {
    color: #fff;
    margin-bottom: 12px;
    text-align: center;
}

.modal-icon200 label {
    color: #ccc;
    font-size: 13px;
    margin-bottom: 6px;
    display: block;
}

.modal-icon200 input {
    width: 100%;
    background: #1a1a1a96;
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 12px;
}

.modal-icon200 textarea {
    width: 100%;
    background: #1a1a1a5d;
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 12px;
    resize: vertical;
    min-height: 100px;
}

.modal-icon200 button {
    width: 100%;
    background: #b90e0e65;
    border: none;
    color: #fff;
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
}

/* ===== АВТОРИЗАЦИЯ ===== */
.authLogNN {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 9999;
    pointer-events: auto;
    cursor: default;
}

.authLogNN.open {
    display: flex;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.authmodeNN {
    background: rgba(0, 0, 0, 0.9);
    border: 2px solid #b90e0e;
    border-radius: 12px;
    padding: 24px;
    width: 100%;
    max-width: 350px;
    position: relative;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.8);
}

.authmodeNN h3 {
    color: #fff;
    font-size: 18px;
    margin-bottom: 16px;
    text-align: center;
}

.authmodeNN .buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
}

.close-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    width: 30px;
    height: 30px;
    line-height: 1;
    padding: 0;
}

.vk-btn,
.github-btn,
.yandex-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    width: 100%;
    justify-content: center;
    margin-top: 10px;
}

.vk-btn:hover {
    background: #0077FF;
    color: #fff;
}

.github-btn:hover {
    background: #333;
    color: #fff;
}

.yandex-btn:hover {
    background: #c40606;
    color: #fff;
}

.loginloginlog {
    background-color: rgba(17, 17, 17, 0.829);
    border: 2px solid rgba(255, 255, 255, 0.397);
    width: 220px;
    height: 40px;
    font-size: 12px;
    display: block;
    justify-content: center;
    text-align: center;
    margin: 0 auto;
    font-family: Arial, Helvetica, sans-serif;

}

.loginloginlog:hover {
    background-color: rgb(94, 10, 10);
    border: 1px solid rgb(250, 4, 4);
    border-radius: 24px;
    color: #fff;
    text-align: center;
    transform: translateY(-7px);
    
}


/* ===== ГАМБУРГЕР ===== */
.hamburger-menu {
    position: fixed;
    top: 20px;
    right: 20px;
    left: auto;
    width: 44px;
    height: 44px;
    background: rgba(17, 17, 17, 0.9);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    cursor: pointer;
    z-index: 1001;
    transition: 0.3s;
}

.hamburger-menu:hover {
    background: rgb(94, 10, 10);
    border-color: rgb(250, 4, 4);
    transform: scale(1.05);
}

.hamburger-line {
    width: 22px;
    height: 2px;
    background: #fff;
    border-radius: 2px;
    transition: 0.3s;
}

.hamburger-menu.open .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger-menu.open .hamburger-line:nth-child(2) {
    opacity: 0;
}

.hamburger-menu.open .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ===== САЙДБАР ===== */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

.sidebar-overlay.open {
    display: block;
}

.sidebar {
    position: fixed;
    top: 0;
    right: -280px;
    left: auto;
    width: 280px;
    height: 100vh;
    background: transparent;
    border-left: 2px solid #b90e0e44;
    border-right: none;
    backdrop-filter: blur(10px);
    z-index: 1002;
    transition: right 0.3s ease;
    display: flex;
    flex-direction: column;
}

.sidebar.open {
    right: 0;
    left: auto;
}

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-header h3 {
    color: #fff;
    margin: 0;
    font-size: 18px;
}

.sidebar-close {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    padding: 4px;
    line-height: 1;
}

.sidebar-close:hover {
    color: #ff6b6b;
}

.sidebar-content {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sidebar-content button {
    width: auto;
    text-align: center;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 14px;
    cursor: pointer;
    transition: 0.3s;
    font-weight: normal;
    font-family: Verdana, Geneva, Tahoma, sans-serif;
}

.sidebar-content button:hover {
    background: rgba(0, 0, 0, 0.548);
    border-color: rgb(255, 255, 255);
    transform: translateX(10px);
}

/* ===== ПРОФИЛЬ В САЙДБАРЕ ===== */
.sidebar-profile {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    margin-bottom: 8px;
    width: 100%;
}

.sidebar-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid #b90e0e;
    flex-shrink: 0;
    background: #333;
}

.sidebar-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.sidebar-user-info {
    flex: 1;
    min-width: 0;
}

.sidebar-username {
    color: #fff;
    font-size: 13px;
    font-weight: bold;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-email {
    color: #888;
    font-size: 11px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-edit-btn {
    background: transparent;
    border: none;
    color: #888;
    font-size: 16px;
    cursor: pointer;
    flex-shrink: 0;
    transition: 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    opacity: 0.7;
    padding: 4px 8px;
}

.sidebar-edit-btn:hover {
    color: #fff;
    opacity: 1;
    background: rgba(185, 14, 14, 0.3);
}

/* ===== РЕДАКТИРОВАНИЕ ПРОФИЛЯ ===== */
.edit-avatar-preview {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    margin: 0 auto 20px;
    border: 3px solid #b90e0e;
    overflow: hidden;
    background: #111;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    transition: 0.3s;
}

.edit-avatar-preview:hover {
    border-color: #ff1a1a;
    box-shadow: 0 0 20px rgba(185, 14, 14, 0.4);
}

.edit-avatar-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: none;
}

.edit-avatar-placeholder {
    color: #666;
    font-size: 32px;
    text-align: center;
}

.edit-avatar-placeholder:hover {
    color: #fff;
}

#edit-profile-modal .modal-box {
    background: rgba(0, 0, 0, 0.548);
    border: 1px solid rgba(185, 14, 14, 0.7);
    border-radius: 14px;
    padding: 24px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
}

#edit-profile-modal h3 {
    color: #fff;
    margin-bottom: 16px;
    font-size: 18px;
    text-align: center;
}

#edit-profile-modal .form-group {
    margin-bottom: 20px;
}

#edit-profile-modal .form-group label {
    display: block;
    color: #ccc;
    font-size: 14px;
    margin-bottom: 8px;
}

#edit-profile-modal .form-group input {
    width: 100%;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    padding: 12px 15px;
    border-radius: 10px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.3s;
}

#edit-profile-modal .form-group input:focus {
    border-color: #b90e0e;
}

#edit-profile-modal .modal-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

#edit-profile-modal .modal-actions button {
    flex: 1;
    padding: 10px;
    font-size: 14px;
    border-radius: 8px;
    cursor: pointer;
}

#edit-profile-modal .modal-actions button:hover {
    transform: scale(1.02);
}

#edit-profile-modal .error-message {
    color: #ff6b6b;
    font-size: 13px;
    margin-top: 10px;
    display: none;
    text-align: center;
}

/* ===== КРОППЕР ===== */
.crop-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.crop-modal.open {
    display: flex;
}

.crop-container {
    background: rgba(20, 20, 20, 0.95);
    border: 2px solid #b90e0e;
    border-radius: 20px;
    padding: 20px;
    width: 100%;
    max-width: 500px;
    text-align: center;
}

.crop-container h3 {
    color: #fff;
    margin-bottom: 15px;
    font-size: 18px;
}

.crop-wrapper {
    width: 100%;
    height: 300px;
    margin-bottom: 15px;
    border-radius: 10px;
    overflow: hidden;
    background: #111;
    display: flex;
    align-items: center;
    justify-content: center;
}

.crop-wrapper img {
    max-width: 100%;
    max-height: 100%;
    display: block;
    object-fit: contain;
}

.crop-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.crop-actions button {
    flex: 1;
    padding: 12px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
    border: none;
}

.crop-cancel {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    color: #fff;
}

.crop-cancel:hover {
    background: rgba(255, 255, 255, 0.1);
}

.crop-confirm {
    background: #b90e0e !important;
    color: #fff;
}

.crop-confirm:hover {
    background: #ff1a1a !important;
}
/* ===== ФИКС МОДАЛКИ ===== */
.modal-overlay.open {
    display: flex !important;
}

.modal-box {
    display: flex !important;
    flex-direction: column !important;
}

#step-1, #step-2, #step-3 {
    display: none;
}

#step-1.form-step, 
#step-2.form-step, 
#step-3.form-step {
    display: none;
    flex: 1;
    flex-direction: column;
}

#step-1.form-step.active,
#step-2.form-step.active,
#step-3.form-step.active {
    display: flex !important;
}

.modal-actions {
    display: flex !important;
    gap: 10px !important;
    margin-top: 16px !important;
    padding-top: 12px !important;
    border-top: 1px solid rgba(255,255,255,0.1) !important;
    flex-shrink: 0 !important;
}

.modal-actions button {
    flex: 1 !important;
    padding: 10px !important;
    font-size: 13px !important;
    border-radius: 8px !important;
    cursor: pointer !important;
}
#step-1.active, #step-2.active, #step-3.active {
    display: flex !important;
}

/* ===== АДАПТИВ ДЛЯ САЙДБАРА ===== */
@media (max-width: 768px) {
    .sidebar {
        width: 260px;
    }

    .hamburger-menu {
        top: 10px;
        right: 10px;
    }
}
/* ===== ИСПРАВЛЕННАЯ НАВИГАЦИЯ ===== */
#step-1.active, 
#step-2.active, 
#step-3.active, 
#step-4.active {
    display: flex !important;
}
