* { 
    box-sizing: border-box; 
}

html { background-color: #0d0d12; }

body {
    background-color: #0d0d12;
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 30px 30px;
    color: #ffffff;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    margin: 0; 
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* === НАВИГАЦИЯ ДЛЯ ПК === */
nav {
    width: 100vw;
    padding: 20px;
    display: flex;
    justify-content: center;
    gap: 40px;
    background: rgba(13, 13, 18, 0.8);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    left: 0;
    z-index: 100;
    box-sizing: border-box;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

nav a {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    text-transform: uppercase;
    font-weight: bold;
    letter-spacing: 2px;
    font-size: 0.9rem;
    transition: 0.3s;
}

nav a:hover {
    color: #ffffff;
    text-shadow: 0 0 10px #b026ff;
}

nav a.active {
    color: #ffffff;
    border-bottom: 2px solid #b026ff;
    padding-bottom: 5px;
    text-shadow: 0 0 10px #b026ff;
}

/* === ГЛАВНЫЙ КОНТЕЙНЕР === */
#outer-container {
    width: 100%;
    display: flex;
    justify-content: center;
    padding-top: 40px;
    padding-bottom: 80px;
}

#scale-wrapper {
    width: 1450px;
    display: flex;
    flex-direction: column;
    align-items: center;
    transform-origin: top center;
    will-change: transform;
}

h1 {
    font-size: 3rem;
    text-transform: uppercase; letter-spacing: 5px;
    text-shadow: 0 0 10px #b026ff, 0 0 20px #b026ff;
    margin-bottom: 50px; text-align: center;
}

.board-container {
    display: flex;
    gap: 25px; 
    width: 100%; 
    justify-content: center;
    /* ФИКС: stretch заставляет все колонки растянуться по высоте самой длинной */
    align-items: stretch;
}

/* === КОЛОНКИ === */
.column {
    flex: 1;
    min-width: 350px; border-radius: 15px; padding: 25px;
    background: linear-gradient(145deg, #1a1a24, #12121a);
    box-shadow: 5px 5px 15px rgba(0,0,0,0.5); border: 1px solid #2a2a35;
    display: flex; flex-direction: column;
    cursor: pointer;
    position: relative;
    transition: transform 0.2s, box-shadow 0.2s;
}

#scale-wrapper .column:hover {
    transform: translateY(-10px);
    box-shadow: 5px 15px 25px rgba(0,0,0,0.8);
}

.col-legends { border: 2px solid #ff26a5; box-shadow: 0 0 15px rgba(255, 38, 165, 0.2); }
.col-sheikhs { border: 2px solid #ffcc00; box-shadow: 0 0 15px rgba(255, 204, 0, 0.2); }
.col-fame { border: 2px solid #ff5e00; box-shadow: 0 0 15px rgba(255, 94, 0, 0.2); }

.column h2 {
    text-align: center;
    font-size: 2rem; margin-top: 0; padding-bottom: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1); text-transform: uppercase;
}
.col-legends h2 { color: #ffb3e1; text-shadow: 0 0 10px #ff26a5; }
.col-sheikhs h2 { color: #ffeea8; text-shadow: 0 0 10px #ffcc00; }
.col-fame h2 { color: #ffc4a3; text-shadow: 0 0 10px #ff5e00; }

/* === КАРТОЧКИ === */
.card {
    background: #15151c;
    border-radius: 10px; padding: 20px; margin-bottom: 15px;
    border: 1px solid #222; position: relative; padding-left: 35px;
}
.card::before {
    content: '';
    position: absolute; left: 12px; top: 20%; bottom: 20%;
    width: 4px; border-radius: 4px;
}
.col-legends .card::before { background: #ff26a5; box-shadow: 0 0 8px #ff26a5; }
.col-sheikhs .card::before { background: #ffcc00; box-shadow: 0 0 8px #ffcc00; }
.col-fame .card::before { background: #ff5e00; box-shadow: 0 0 8px #ff5e00; }

.card-title { font-size: 1rem; margin-bottom: 8px; text-transform: uppercase; font-weight: bold; letter-spacing: 1px; }
.col-legends .card-title { color: #ff26a5; }
.col-sheikhs .card-title { color: #ffcc00; }
.col-fame .card-title { color: #ff5e00; }

.card-value { 
    font-size: 1.5rem; 
    font-weight: bold; 
    white-space: nowrap;
}
.col-legends .card-value { color: #ffb3e1; text-shadow: 0 0 10px #ff26a5; }
.col-sheikhs .card-value { color: #ffeea8; text-shadow: 0 0 10px #ffcc00; }
.col-fame .card-value { color: #ffc4a3; text-shadow: 0 0 10px #ff5e00; }

.date-stamp {
    margin-top: 40px;
    color: #ffffff;
    font-size: 1.1rem;
    letter-spacing: 2px;
    text-shadow: 0 0 10px #b026ff, 0 0 20px #b026ff;
    font-weight: bold;
}

/* === ЧИСТОЕ ДЕСКТОПНОЕ МОДАЛЬНОЕ ОКНО === */
#modal-overlay {
    position: fixed; top: 0; left: 0; 
    width: 100vw; height: 100vh;
    background: rgba(13, 13, 18, 0.95);
    backdrop-filter: blur(10px); z-index: 9999;
    display: flex; justify-content: center; align-items: center;
    overflow-y: auto; padding: 40px 20px;
    opacity: 0; pointer-events: none;
    transition: opacity 0.3s ease;
}
#modal-overlay.visible { opacity: 1; pointer-events: auto; }

#modal-layout {
    display: flex; align-items: flex-start; justify-content: center;
    gap: 50px; max-width: 1100px; width: 100%; margin: 0 auto;
    position: relative; left: -200px;
}

#external-info {
    flex: 1; max-width: 400px; margin-top: 100px; 
    font-size: 1.6rem; line-height: 1.6; text-align: left;
    font-weight: bold; opacity: 0; transition: opacity 0.4s ease;
    white-space: pre-line;
}

#modal-content {
    flex: 1.5; max-width: 600px; width: 100%;
    cursor: default; padding-top: 65px; opacity: 0;
    transition: opacity 0.4s ease;
}

#modal-overlay.visible #external-info,
#modal-overlay.visible #modal-content { opacity: 1; }

.layout-legends #external-info { color: #ffb3e1; text-shadow: 0 0 15px #ff26a5, 0 0 30px #ff26a5; }
.layout-sheikhs #external-info { color: #ffeea8; text-shadow: 0 0 15px #ffcc00, 0 0 30px #ffcc00; }
.layout-fame #external-info { color: #ffc4a3; text-shadow: 0 0 15px #ff5e00, 0 0 30px #ff5e00; }

.close-btn {
    position: absolute; top: 15px; right: 20px;
    width: 45px; height: 45px; border-radius: 50%;
    background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.2);
    color: white; font-size: 22px; font-weight: bold;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; z-index: 10001; transition: 0.3s;
}
.col-legends .close-btn:hover { background: #ff26a5; border-color: #ff26a5; box-shadow: 0 0 15px #ff26a5; transform: rotate(90deg); }
.col-sheikhs .close-btn:hover { background: #ffcc00; border-color: #ffcc00; box-shadow: 0 0 15px #ffcc00; transform: rotate(90deg); color: #000; }
.col-fame .close-btn:hover { background: #ff5e00; border-color: #ff5e00; box-shadow: 0 0 15px #ff5e00; transform: rotate(90deg); }

#modal-data .card {
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
#modal-data .card:hover { transform: translateY(-4px); }
.col-legends #modal-data .card:hover { border-color: rgba(255,38,165,0.6); box-shadow: 0 0 12px rgba(255,38,165,0.25); }
.col-sheikhs #modal-data .card:hover { border-color: rgba(255,204,0,0.6); box-shadow: 0 0 12px rgba(255,204,0,0.25); }
.col-fame #modal-data .card:hover { border-color: rgba(255,94,0,0.6); box-shadow: 0 0 12px rgba(255,94,0,0.25); }

/* === СЕКРЕТНЫЙ РЕЖИМ АДМИНА === */
#admin-trigger {
    position: fixed; bottom: 10px; right: 15px;
    color: rgba(255,255,255,0.05); font-size: 12px;
    cursor: pointer; user-select: none; z-index: 10000;
}

#admin-glow {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    box-shadow: inset 0 0 120px rgba(176, 38, 255, 0.7), inset 0 0 30px rgba(176, 38, 255, 1);
    pointer-events: none; z-index: 9998;
    opacity: 0; transition: opacity 1s ease;
}
body.admin-mode #admin-glow {
    opacity: 1;
}
#admin-panel-link {
    display: none;
    position: fixed; bottom: 30px; left: 50%; transform: translateX(-50%);
    background: linear-gradient(45deg, #7a10b3, #b026ff);
    color: white; padding: 15px 30px; border-radius: 30px;
    text-transform: uppercase; font-weight: bold; text-decoration: none;
    box-shadow: 0 0 20px #b026ff; z-index: 10000;
    letter-spacing: 2px;
}
body.admin-mode #admin-panel-link {
    display: block;
}