/* ================================================================
   DESKTOP STYLES — ОБЩИЙ LAYOUT
   ================================================================ */
*, *::before, *::after {
    box-sizing: border-box;
}

html, body {
    height: 100%;
    min-height: 100vh;
}

body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background: #1a1a2e;
    color: #E2E8F0;
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-y: auto;
}

/* ==================== HEADER ==================== */
.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 60px;
    padding: 0 24px;
    background: #1a1a2e;
    color: white;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    flex-shrink: 0;
}

.header-left,
.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.header-center {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.header-title {
    font-size: 22px;
    font-weight: 700;
    color: #fff;
    text-decoration: none;
    letter-spacing: 0.5px;
    transition: color 0.2s ease;
}

.header-title:hover {
    color: #FBBF24;
}

/* Кнопки */
.icon-btn {
    background: none;
    border: none;
    font-size: 22px;
    cursor: pointer;
    color: white;
    padding: 8px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: background 0.2s;
}

.icon-btn:hover {
    background: rgba(255, 255, 255, 0.08);
}

.header-lang-btn {
    background: #2a2a3e;
    color: #fff;
    border: 1px solid #444;
    border-radius: 50px;
    padding: 8px 20px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    letter-spacing: 1px;
    text-transform: uppercase;
    white-space: nowrap;
    transition: all 0.2s;
}

.header-lang-btn:hover {
    background: #3a3a5e;
    border-color: #6c8cff;
}

.header-icon-btn {
    background: none;
    border: 1px solid #444;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    color: #aaa;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.header-icon-btn:hover {
    color: #fff;
    border-color: #6c8cff;
    background: #2a2a3e;
}

/* ==================== MAIN ==================== */
.app-main {
    flex: 1;
    margin-top: 60px;
    padding: 32px 40px;
    padding-bottom: 60px;
    overflow-y: auto;
}

/* ==================== SIDEBAR (для авторизованных) ==================== */
.app-sidebar {
    position: fixed;
    left: 0;
    top: 60px;
    bottom: 0;
    width: 260px;
    background: #1e1e2e;
    border-right: 1px solid rgba(255, 255, 255, 0.06);
    overflow-y: auto;
    z-index: 90;
    padding: 16px 0;
}

/* ==================== STATES ==================== */
.loading {
    color: #6B82F8;
    text-align: center;
    padding: 40px 20px;
    font-size: 15px;
}

.empty-state {
    color: #94A3B8;
    text-align: center;
    padding: 60px 20px;
    font-size: 15px;
}

.error-state {
    color: #ef4444;
    text-align: center;
    padding: 40px 20px;
    font-size: 15px;
}

/* ==================== LANGUAGE MODAL ==================== */
.lang-modal {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.lang-modal-content {
    background: #1e1e2e;
    border: 1px solid #333;
    border-radius: 12px;
    padding: 24px;
    min-width: 320px;
    max-width: 90vw;
}

.lang-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.lang-modal-header h3 {
    margin: 0;
    color: #fff;
    font-size: 20px;
}

.lang-close-btn {
    background: none;
    border: none;
    color: #888;
    font-size: 22px;
    cursor: pointer;
}

.lang-close-btn:hover {
    color: #fff;
}

.lang-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.lang-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: #2a2a3e;
    border: 1px solid #333;
    border-radius: 8px;
    color: #ccc;
    cursor: pointer;
    text-align: left;
    font-size: 15px;
    width: 100%;
    transition: all 0.2s;
}

.lang-option:hover,
.lang-option.active {
    background: #3a3a5e;
    border-color: #6c8cff;
    color: #fff;
}

.lang-code {
    font-weight: 700;
    font-size: 14px;
    min-width: 28px;
}

/* ==================== ABOUT MODAL ==================== */
.about-modal {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.about-modal-content {
    background: #1e1e2e;
    border: 1px solid #333;
    border-radius: 12px;
    padding: 32px;
    max-width: 720px;
    max-height: 80vh;
    overflow-y: auto;
    width: 90vw;
}

.about-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.about-modal-header h2 {
    margin: 0;
    color: #fff;
    font-size: 22px;
}

.about-close-btn {
    background: none;
    border: none;
    color: #888;
    font-size: 24px;
    cursor: pointer;
}

.about-close-btn:hover {
    color: #fff;
}

.about-body {
    color: #ccc;
    line-height: 1.6;
}

.about-body h3 {
    color: #fff;
    margin-top: 20px;
}

/* ==================== LANGUAGE SELECTOR (для лендинга) ==================== */
.language-selector {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin-top: 24px;
}

.language-selector select {
    padding: 10px 20px;
    font-size: 15px;
    border: 1px solid #444;
    border-radius: 8px;
    background: #1e1e2e;
    color: #fff;
    cursor: pointer;
    min-width: 200px;
}

/* ==================== LOGO ==================== */
.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo a {
    font-size: 20px;
    color: white;
    text-decoration: none;
    font-weight: bold;
}

.logo-img {
    height: 32px;
    width: auto;
    display: block;
}


/* ============================================================
   ОТСТУП ПОД SIDEBAR (260px)
   ============================================================ */
body.has-sidebar .app-main {
    margin-left: 260px;
}

/* Header тоже сдвигаем */
/*
body.has-sidebar .app-header {
    padding-left: 24px;   
}
*/
/* Footer */
/*
body.has-sidebar .app-footer {
    margin-left: 260px;
}
*/