/* ===================================
   SETTINGS MENU MODERN - Современное меню настроек
   =================================== */

.settings-modern {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.settings-modern-container {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(20, 20, 30, 0.95), rgba(30, 30, 45, 0.95));
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* === HEADER === */

.settings-modern-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 30px;
    background: linear-gradient(135deg, rgba(46, 204, 113, 0.1), rgba(52, 152, 219, 0.1));
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

.settings-modern-title {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 28px;
    font-weight: bold;
    color: #fff;
    margin: 0;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.settings-modern-title-icon {
    font-size: 32px;
    animation: rotate 3s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.settings-close-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(231, 76, 60, 0.2);
    border: 2px solid rgba(231, 76, 60, 0.5);
    color: #e74c3c;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.settings-close-btn:hover {
    background: rgba(231, 76, 60, 0.3);
    border-color: #e74c3c;
    transform: rotate(90deg);
}

/* === TABS === */

.settings-modern-tabs {
    display: flex;
    gap: 10px;
    padding: 20px 30px;
    background: rgba(0, 0, 0, 0.3);
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
    justify-content: center;
    align-items: center;
}

.settings-tab-btn {
    padding: 12px 24px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.6);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.settings-tab-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.8);
    transform: translateY(-2px);
}

.settings-tab-btn.active {
    background: linear-gradient(135deg, #2ecc71, #27ae60);
    border-color: #2ecc71;
    color: #fff;
    box-shadow: 0 4px 15px rgba(46, 204, 113, 0.3);
}

/* === CONTENT === */

.settings-modern-content {
    flex: 1;
    overflow-y: auto;
    padding: 30px;
}

.settings-modern-content::-webkit-scrollbar {
    width: 8px;
}

.settings-modern-content::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
}

.settings-modern-content::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
}

.settings-modern-content::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

.settings-tab-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* === CARDS === */

.settings-card {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 25px;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.settings-card:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.settings-card-warning {
    border-color: rgba(243, 156, 18, 0.3);
    background: rgba(243, 156, 18, 0.05);
}

.settings-card-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: bold;
    color: #fff;
    margin: 0 0 20px 0;
}

.settings-card-icon {
    font-size: 24px;
}

/* === INFO GRID === */

.settings-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.settings-info-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.settings-info-icon {
    font-size: 28px;
    min-width: 40px;
    text-align: center;
}

.settings-info-text {
    display: flex;
    flex-direction: column;
    gap: 5px;
    flex: 1;
}

.settings-info-label {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.settings-info-value {
    font-size: 16px;
    font-weight: 600;
    color: #fff;
}

/* === INPUT GROUP === */

.settings-input-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 15px;
}

.settings-label {
    font-size: 14px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
}

.settings-input {
    padding: 12px 15px;
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: #fff;
    font-size: 16px;
    transition: all 0.3s ease;
}

.settings-input:focus {
    outline: none;
    border-color: #2ecc71;
    background: rgba(0, 0, 0, 0.4);
    box-shadow: 0 0 15px rgba(46, 204, 113, 0.2);
}

.settings-input-hint {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
}

.settings-preview {
    padding: 12px 15px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 15px;
}

.alias-preview {
    color: #2ecc71;
}

/* === BUTTONS === */

.settings-btn {
    padding: 12px 24px;
    background: linear-gradient(135deg, rgba(52, 152, 219, 0.8), rgba(41, 128, 185, 0.8));
    border: 2px solid rgba(52, 152, 219, 0.5);
    border-radius: 10px;
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.settings-btn:hover {
    background: linear-gradient(135deg, #3498db, #2980b9);
    border-color: #3498db;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.4);
}

.settings-btn-primary {
    background: linear-gradient(135deg, rgba(46, 204, 113, 0.8), rgba(39, 174, 96, 0.8));
    border-color: rgba(46, 204, 113, 0.5);
}

.settings-btn-primary:hover {
    background: linear-gradient(135deg, #2ecc71, #27ae60);
    border-color: #2ecc71;
    box-shadow: 0 6px 20px rgba(46, 204, 113, 0.4);
}

.settings-btn-warning {
    background: linear-gradient(135deg, rgba(243, 156, 18, 0.8), rgba(211, 84, 0, 0.8));
    border-color: rgba(243, 156, 18, 0.5);
}

.settings-btn-warning:hover {
    background: linear-gradient(135deg, #f39c12, #d35400);
    border-color: #f39c12;
    box-shadow: 0 6px 20px rgba(243, 156, 18, 0.4);
}

.settings-price {
    padding: 4px 8px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 5px;
    font-size: 14px;
}

/* === TOGGLE SWITCHES === */

.settings-toggle-group {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.settings-toggle-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.settings-toggle-label {
    font-size: 16px;
    font-weight: 600;
    color: #fff;
}

.settings-toggle-switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 30px;
}

.settings-toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.settings-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.1);
    transition: 0.4s;
    border-radius: 30px;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.settings-toggle-slider:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    transition: 0.4s;
    border-radius: 50%;
}

.settings-toggle-switch input:checked + .settings-toggle-slider {
    background: linear-gradient(135deg, #2ecc71, #27ae60);
    border-color: #2ecc71;
}

.settings-toggle-switch input:checked + .settings-toggle-slider:before {
    transform: translateX(30px);
}

/* === VOLUME SLIDERS === */

.settings-volume-control {
    margin-bottom: 20px;
}

.settings-volume-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.settings-volume-label {
    font-size: 16px;
    font-weight: 600;
    color: #fff;
}

.settings-volume-value {
    font-size: 16px;
    font-weight: bold;
    color: #2ecc71;
}

.settings-volume-slider {
    width: 100%;
    height: 8px;
    border-radius: 5px;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
}

.settings-volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #fff;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.settings-volume-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

.settings-volume-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #fff;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.settings-volume-slider::-moz-range-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

/* === NOTIFICATIONS GRID === */

.settings-notifications-grid {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.settings-notification-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.settings-notification-info {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 1;
}

.settings-notification-icon {
    font-size: 28px;
    min-width: 40px;
    text-align: center;
}

.settings-notification-text {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.settings-notification-label {
    font-size: 16px;
    font-weight: 600;
    color: #fff;
}

.settings-notification-desc {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
}

/* === INTERFACE GRID === */

.settings-interface-grid {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.settings-interface-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.settings-interface-info {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 1;
}

.settings-interface-icon {
    font-size: 28px;
    min-width: 40px;
    text-align: center;
}

.settings-interface-text {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.settings-interface-label {
    font-size: 16px;
    font-weight: 600;
    color: #fff;
}

.settings-interface-desc {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
}

/* === PASSWORD STRENGTH === */

.password-strength {
    margin-top: 10px;
}

.password-strength.hidden {
    display: none;
}

.strength-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 5px;
}

.strength-fill {
    height: 100%;
    width: 0%;
    transition: all 0.3s ease;
    border-radius: 5px;
}

.strength-label {
    font-size: 12px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
}

/* === SOCIAL NETWORKS === */

.settings-social-links {
    margin-bottom: 15px;
}

.settings-social-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.settings-social-item.connected {
    border-color: rgba(46, 204, 113, 0.3);
    background: rgba(46, 204, 113, 0.05);
}

.settings-social-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #3498db, #2980b9);
    border-radius: 10px;
    font-weight: bold;
    color: #fff;
}

.settings-social-name {
    flex: 1;
    font-size: 16px;
    font-weight: 600;
    color: #fff;
}

.settings-social-status {
    font-size: 14px;
    color: #2ecc71;
    font-weight: 600;
}

/* === SECURITY RULES === */

.settings-security-rules {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.settings-security-rule {
    display: flex;
    gap: 15px;
    padding: 15px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.settings-rule-icon {
    font-size: 28px;
    min-width: 40px;
    text-align: center;
}

.settings-rule-text {
    flex: 1;
}

.settings-rule-text strong {
    display: block;
    font-size: 16px;
    color: #fff;
    margin-bottom: 8px;
}

.settings-rule-text p {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
    line-height: 1.5;
}

/* === ANIMATIONS === */

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* === RESPONSIVE === */

@media (max-width: 768px) {
    .settings-modern-container {
        width: 95%;
        max-height: 95vh;
    }

    .settings-modern-header {
        padding: 15px 20px;
    }

    .settings-modern-title {
        font-size: 22px;
    }

    .settings-modern-tabs {
        padding: 15px 20px;
        gap: 5px;
        overflow-x: auto;
    }

    .settings-tab-btn {
        padding: 10px 16px;
        font-size: 14px;
    }

    .settings-modern-content {
        padding: 20px;
    }

    .settings-card {
        padding: 20px;
    }

    .settings-info-grid {
        grid-template-columns: 1fr;
    }

    .menu-navigation {
        display: none;
    }
}

@media (max-width: 480px) {
    .settings-modern-title {
        font-size: 18px;
    }

    .settings-modern-title-icon {
        font-size: 24px;
    }

    .settings-tab-btn {
        padding: 8px 12px;
        font-size: 13px;
    }

    .settings-card-title {
        font-size: 18px;
    }

    .settings-btn {
        padding: 10px 20px;
        font-size: 14px;
    }
}

/* ============================================
   КОМПАКТНЫЙ РЕЖИМ
   ============================================ */

body.compact-mode .settings-modern-header {
    padding: 10px 15px !important;
}

body.compact-mode .settings-modern-title {
    font-size: 20px !important;
}

body.compact-mode .settings-modern-title-icon {
    font-size: 24px !important;
}

body.compact-mode .settings-modern-tabs {
    padding: 10px 15px !important;
}

body.compact-mode .settings-tab-btn {
    padding: 8px 14px !important;
    font-size: 13px !important;
}

body.compact-mode .settings-modern-content {
    padding: 15px !important;
}

body.compact-mode .settings-card {
    padding: 15px !important;
    margin-bottom: 12px !important;
}

body.compact-mode .settings-card-title {
    font-size: 16px !important;
    margin-bottom: 12px !important;
}

body.compact-mode .settings-input-group {
    margin-bottom: 12px !important;
}

body.compact-mode .settings-btn {
    padding: 8px 16px !important;
    font-size: 13px !important;
}

/* Компактный режим для других меню */
body.compact-mode .skill-modern-header,
body.compact-mode .stat-modern-header,
body.compact-mode .colony-modern-header,
body.compact-mode .tree-modern-header {
    padding: 10px 15px !important;
}

body.compact-mode .skill-modern-title,
body.compact-mode .stat-modern-title,
body.compact-mode .colony-modern-title,
body.compact-mode .tree-modern-title {
    font-size: 20px !important;
}

body.compact-mode .skill-item,
body.compact-mode .stat-item {
    padding: 10px !important;
}

body.compact-mode .colony-member-item {
    padding: 10px !important;
}
