/* Общие сбросы и стили для body */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    background: url('https://vcraft.skin/storage/img/bg80.png') center center / cover no-repeat fixed;
    min-height: 100vh;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #ffffff;
}

/* Header */
.header {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    width: calc(100% - 40px);
    max-width: 1312px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 20px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.header-logo {
    font-size: 28px;
    font-weight: bold;
    color: #00bfff;
    text-decoration: none;
}
.header-nav {
    display: flex;
    align-items: center;
    gap: 32px;
}
.nav-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    transition: color 0.2s;
}
.nav-item:hover {
    color: #ffffff;
}
.nav-item img {
    width: 18px;
    height: 18px;
}
.header-buttons {
    display: flex;
    align-items: center;
    gap: 16px;
}
.btn-account {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 12px 24px;
    color: #ffffff;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
    min-width: 160px;
    justify-content: center;
}
.btn-account:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
}
.btn-launcher {
    background: #007bff;
    border: none;
    border-radius: 12px;
    padding: 12px 24px;
    color: #ffffff;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
    min-width: 180px;
    justify-content: center;
}
.btn-launcher:hover {
    background: #0056b3;
    color: #ffffff;
}
.btn-launcher img, .btn-account img {
    width: 18px;
    height: 18px;
}

/* --- Авторизация --- */
.main-content {
    padding: 40px 20px;
    max-width: 1352px;
    margin-left: auto;
    margin-right: auto;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 200px);
}
.login-container {
    width: 100%;
    max-width: 450px;
}
.login-card {
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 40px;
    text-align: center;
}
.login-title {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 8px;
    color: #ffffff;
}
.login-subtitle {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 32px;
}
.form-group {
    margin-bottom: 20px;
    text-align: left;
}
.form-label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
}
.form-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 14px 18px;
    color: #ffffff;
    font-size: 15px;
    transition: all 0.2s;
}
.form-input:focus {
    outline: none;
    border-color: #007bff;
    background: rgba(255, 255, 255, 0.06);
}
.form-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}
.form-input.is-invalid {
    border-color: #dc3545;
}
.invalid-feedback {
    color: #dc3545;
    font-size: 13px;
    margin-top: 6px;
}
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 12px;
}
.form-check {
    display: flex;
    align-items: center;
    gap: 8px;
}
.form-check-input {
    width: 18px;
    height: 18px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 4px;
    cursor: pointer;
}
.form-check-input:checked {
    background: #007bff;
    border-color: #007bff;
}
.form-check-label {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
}
.forgot-password {
    color: #007bff;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s;
}
.forgot-password:hover {
    color: #0056b3;
}
.btn-login {
    width: 100%;
    background: #007bff;
    border: none;
    border-radius: 12px;
    padding: 16px 24px;
    color: #ffffff;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 24px;
    box-sizing: border-box;
}
.btn-login:hover {
    background: #0056b3;
}
.login-footer {
    text-align: center;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.login-footer p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    margin: 0;
}
.login-footer a {
    color: #007bff;
    text-decoration: none;
    font-weight: 500;
}
.login-footer a:hover {
    color: #0056b3;
}

/* --- Профиль --- */
.profile-container {
    display: grid;
grid-template-columns: 819px 1fr;
    gap: 32px;
    margin-bottom: 10px;
width: 100%;
}
.profile-main-card {
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 32px;
}
.profile-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 32px;
}
.profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 16px;
}
.profile-info h2 {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 8px;
}
.profile-role {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 500;
}
.profile-details {
    margin-bottom: 32px;
}
.profile-details p {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 10px;
}
.profile-actions {
    display: flex;
    gap: 16px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}
.btn-2fa {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    padding: 12px 20px;
    color: #ffffff;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
}
.btn-2fa:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
}
.btn-2fa img {
    width: 16px;
    height: 16px;
}
.forms-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}
.form-section {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    padding: 24px;
}
.form-section h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.form-section h3 img {
    width: 20px;
    height: 20px;
}
.btn-save {
    background: #007bff;
    border: none;
    border-radius: 12px;
    padding: 12px 20px;
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s;
}
.btn-save:hover {
    background: #0056b3;
}
.btn-save img {
    width: 16px;
    height: 16px;
}
.skin-viewer-card {
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 32px;
    text-align: center;
    height: fit-content;
}
.skin-viewer-card h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 24px;
}
.skin3d-canvas {
    cursor: grab;
    border-radius: 16px;
    margin-bottom: 24px;
    width: 100% !important;
    max-width: 280px;
    height: 400px;
}
.skin3d-canvas:active {
    cursor: grabbing;
}
.skin-upload-buttons {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.upload-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    padding: 14px 20px;
    color: #ffffff;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    overflow: hidden;
}
.upload-btn:hover {
    background: rgba(255, 255, 255, 0.12);
}
.upload-btn input[type="file"] {
    position: absolute;
    left: 0;
    top: 0;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}
.upload-btn img {
    width: 18px;
    height: 18px;
}
/* Ошибки и alert'ы */
.form-input.is-invalid {
    border-color: #dc3545;
}
.invalid-feedback {
    color: #dc3545;
    font-size: 12px;
    margin-top: 6px;
}
.alert {
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 32px;
}
.alert-success {
    border-color: rgba(40, 167, 69, 0.3);
    background: rgba(40, 167, 69, 0.08);
}
.alert-warning {
    border-color: rgba(255, 193, 7, 0.3);
    background: rgba(255, 193, 7, 0.08);
}

/* --- Responsive --- */
@media (max-width: 1024px) {
    .profile-container {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    .forms-grid {
        grid-template-columns: 1fr;
    }
    .header {
        flex-direction: column;
        gap: 20px;
        padding: 20px;
    }
    .header-nav {
        order: 2;
        flex-wrap: wrap;
        justify-content: center;
    }
    .header-buttons {
        order: 1;
    }
}
@media (max-width: 768px) {
    .main-content {
        margin-top: 200px;
        padding: 0 16px;
    }
    .header {
        width: calc(100% - 32px);
        top: 16px;
    }
    .login-card {
        padding: 32px 24px;
    }
    .login-title {
        font-size: 28px;
    }
    .form-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    .profile-header {
        flex-direction: column;
        text-align: center;
    }
    .profile-actions {
        justify-content: center;
    }
    .forms-grid {
        grid-template-columns: 1fr;
    }
}
@media (max-width: 480px) {
    .login-card {
        padding: 24px 20px;
    }
    .login-title {
        font-size: 24px;
    }
}







/* --- Cosmetics Page Styles --- */
.cosmetics-container {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 32px;
    margin-bottom: 20px;
    width: 100%;
    max-width: 1400px;
}

.cosmetics-panel {
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 32px;
}

.cosmetics-panel h2 {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #ffffff;
}

.cosmetics-panel p {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 32px;
    font-size: 16px;
}

.cosmetics-categories {
    margin-bottom: 32px;
}

.cosmetics-category {
    margin-bottom: 32px;
}

.cosmetics-category h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 16px;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cosmetics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 16px;
}

.cosmetic-item {
    background: rgba(255, 255, 255, 0.06);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 16px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.cosmetic-item:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.cosmetic-item.selected {
    background: rgba(0, 191, 255, 0.2);
    border-color: #00bfff;
}

.cosmetic-item img {
    width: 64px;
    height: 64px;
    border-radius: 8px;
    margin-bottom: 8px;
    object-fit: cover;
}

.cosmetic-item span {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
    text-transform: capitalize;
}

.cosmetics-actions {
    display: flex;
    gap: 16px;
    justify-content: space-between;
}

.btn-reset {
    background: rgba(220, 53, 69, 0.2);
    border: 1px solid rgba(220, 53, 69, 0.3);
    border-radius: 12px;
    padding: 12px 20px;
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-reset:hover {
    background: rgba(220, 53, 69, 0.3);
}

.skin-viewer-panel {
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 32px;
    text-align: center;
    height: fit-content;
    position: sticky;
    top: 120px;
}

.skin-viewer-panel h3 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 24px;
    color: #ffffff;
}

.selected-cosmetics {
    margin-top: 24px;
    text-align: left;
}

.selected-cosmetics h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 12px;
    color: rgba(255, 255, 255, 0.9);
}

.selected-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    padding: 8px 12px;
    margin-bottom: 8px;
}

.selected-item span {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
    text-transform: capitalize;
}

.remove-btn {
    background: rgba(220, 53, 69, 0.3);
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    color: #ffffff;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.remove-btn:hover {
    background: rgba(220, 53, 69, 0.5);
}

.no-cosmetics {
    color: rgba(255, 255, 255, 0.5);
    font-style: italic;
    font-size: 14px;
    margin: 0;
}

/* Loading overlay */
#loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.loading-spinner {
    text-align: center;
    color: #ffffff;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.2);
    border-top: 4px solid #00bfff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 16px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-spinner p {
    font-size: 16px;
    font-weight: 500;
    margin: 0;
}

/* Responsive styles for cosmetics */
@media (max-width: 1024px) {
    .cosmetics-container {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    
    .skin-viewer-panel {
        position: static;
    }
    
    .cosmetics-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 12px;
    }
    
    .cosmetic-item {
        padding: 12px;
    }
    
    .cosmetic-item img {
        width: 48px;
        height: 48px;
    }
}

@media (max-width: 768px) {
    .cosmetics-panel {
        padding: 24px;
    }
    
    .skin-viewer-panel {
        padding: 24px;
    }
    
    .cosmetics-actions {
        flex-direction: column;
    }
    
    .cosmetics-grid {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
        gap: 8px;
    }
    
    .cosmetic-item {
        padding: 8px;
    }
    
    .cosmetic-item img {
        width: 40px;
        height: 40px;
    }
    
    .cosmetic-item span {
        font-size: 11px;
    }
}
