* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: #050508;
    color: #fff;
    overflow: hidden;
    height: 100vh;
    width: 100vw;
    position: relative;
    transition: background-color 0.6s ease, color 0.6s ease;
}

.content {
    position: relative;
    z-index: 10;
    padding: 30px;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* Верхняя панель */
.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    width: 100%;
    z-index: 20;
}

.node-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 10px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 1.5px;
    backdrop-filter: blur(10px);
}

.status-dot {
    width: 8px;
    height: 8px;
    background-color: #00ff88;
    border-radius: 50%;
    box-shadow: 0 0 10px #00ff88;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.nav-links {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.nav-link {
    color: #fff;
    text-decoration: none;
    background-color: rgba(0, 0, 0, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 10px 15px;
    border-radius: 4px;
    font-size: 13px;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    cursor: pointer;
    backdrop-filter: blur(6px);
}

.nav-link:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 0 15px rgba(100, 150, 255, 0.25);
}

.arrow {
    margin-left: 5px;
}

/* Центральная рабочая панель */
.workspace-Wrapper {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    width: 100%;
    max-width: 620px;
    z-index: 20;
}

.glass-panel {
    width: 100%;
    background: rgba(12, 14, 24, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 12px;
    padding: 24px;
    backdrop-filter: blur(16px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.panel-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 12px;
}

.tab-btn {
    background: transparent;
    border: 1px solid transparent;
    color: rgba(255, 255, 255, 0.6);
    padding: 8px 14px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.8px;
    transition: all 0.2s;
}

.tab-btn.active {
    background: rgba(70, 120, 250, 0.2);
    border-color: rgba(70, 120, 250, 0.5);
    color: #fff;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.panel-header h3 {
    font-size: 18px;
    margin-bottom: 6px;
}

.panel-header p {
    font-size: 13px;
    opacity: 0.7;
    margin-bottom: 18px;
    line-height: 1.4;
}

/* Зона загрузки и контролы */
.drop-zone {
    border: 1px dashed rgba(120, 160, 255, 0.4);
    border-radius: 8px;
    padding: 28px 20px;
    text-align: center;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.02);
    transition: all 0.25s ease;
    margin-bottom: 16px;
}

.drop-zone:hover {
    border-color: rgba(120, 160, 255, 0.8);
    background: rgba(70, 120, 250, 0.08);
}

.drop-text {
    font-size: 14px;
}

.sub-hint {
    display: block;
    font-size: 11px;
    opacity: 0.5;
    margin-top: 6px;
}

.converter-controls {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 16px;
}

.control-group label {
    display: block;
    font-size: 12px;
    opacity: 0.8;
    margin-bottom: 6px;
}

.styled-input {
    width: 100%;
    padding: 8px 10px;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    border-radius: 4px;
    font-size: 13px;
}

input[type="range"] {
    width: 100%;
    accent-color: #4678fa;
    cursor: pointer;
}

.conversion-result {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.hidden {
    display: none !important;
}

.stats-row {
    font-size: 13px;
    margin-bottom: 10px;
    color: #88ffbb;
}

.action-btn {
    display: block;
    width: 100%;
    text-align: center;
    background: linear-gradient(135deg, #3a66db, #6342e8);
    color: #fff;
    text-decoration: none;
    border: none;
    padding: 11px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 1px;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.2s;
}

.action-btn:hover {
    opacity: 0.92;
    transform: translateY(-1px);
}

/* Сетка телеметрии */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 14px;
}

.metric-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 10px 12px;
    border-radius: 6px;
}

.metric-label {
    display: block;
    font-size: 10px;
    opacity: 0.55;
    letter-spacing: 0.8px;
    margin-bottom: 4px;
}

.metric-value {
    font-size: 16px;
    font-weight: 700;
    font-family: monospace;
    color: #9cb8ff;
}

.ping-log {
    background: rgba(0, 0, 0, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    padding: 10px;
    height: 95px;
    overflow-y: auto;
    font-family: monospace;
    font-size: 11px;
    line-height: 1.5;
    color: #b0c4de;
    margin-bottom: 14px;
}

/* Нижняя панель */
.bottom-bar {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    width: 100%;
}

.taglines {
    font-size: 15px;
    text-align: right;
    order: 2;
}

.taglines p {
    margin-bottom: 6px;
    opacity: 0.75;
}

.logo {
    order: 1;
}

.logo h1 {
    font-size: 110px;
    font-weight: 900;
    letter-spacing: -4px;
    line-height: 0.85;
}

/* Кристалл (Твой оригинальный стиль) */
.bubble-container {
    position: absolute;
    top: 0;
    right: 0;
    width: 65%;
    height: 100vh;
    overflow: hidden;
    z-index: 1;
    perspective: 1200px;
    pointer-events: none;
}

.crystal-sphere {
    position: absolute;
    width: 760px;
    height: 760px;
    right: -180px;
    top: 50%;
    transform: translateY(-50%) rotateY(30deg) rotateX(10deg);
    transform-style: preserve-3d;
    transition: transform 1.5s cubic-bezier(0.175, 0.885, 0.32, 1.275),
                top 1.5s ease, width 1.5s ease, height 1.5s ease;
}

.crystal-face {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0.55;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.18), rgba(70, 120, 250, 0.2));
    border: 1px solid rgba(255, 255, 255, 0.2);
    transform-style: preserve-3d;
    transition: transform 1.2s cubic-bezier(0.19, 1, 0.22, 1), opacity 1.2s ease, background 1.2s ease;
    box-shadow: 0 0 20px rgba(100, 150, 255, 0.25);
    clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
}

.face1 { transform: translateZ(200px) rotateY(0deg); }
.face2 { transform: translateZ(-200px) rotateY(180deg); }
.face3 { transform: translateX(200px) rotateY(90deg); }
.face4 { transform: translateX(-200px) rotateY(-90deg); }
.face5 { transform: translateY(200px) rotateX(90deg); }
.face6 { transform: translateY(-200px) rotateX(-90deg); }
.face7 { transform: translateZ(100px) scale(0.7) rotateZ(45deg); }
.face8 { transform: translateZ(-100px) scale(0.7) rotateZ(-45deg); }

/* Светлая тема */
body.light-theme {
    background-color: #eef2ff;
    color: #111;
}

body.light-theme .glass-panel {
    background: rgba(255, 255, 255, 0.82);
    border-color: rgba(70, 120, 250, 0.25);
    color: #1a1a2e;
    box-shadow: 0 15px 40px rgba(70, 120, 250, 0.12);
}

body.light-theme .nav-link,
body.light-theme .node-badge {
    background: rgba(255, 255, 255, 0.8);
    color: #1a1a2e;
    border-color: rgba(70, 120, 250, 0.3);
}

body.light-theme .tab-btn {
    color: #444;
}

body.light-theme .tab-btn.active {
    background: rgba(70, 120, 250, 0.15);
    color: #1a1a2e;
}

body.light-theme .styled-input {
    background: #fff;
    color: #111;
    border-color: rgba(0,0,0,0.2);
}

body.light-theme .metric-card {
    background: rgba(70, 120, 250, 0.06);
    border-color: rgba(70, 120, 250, 0.15);
}

body.light-theme .metric-value {
    color: #2b50aa;
}

/* Адаптив для мобилок */
@media (max-width: 992px) {
    .bubble-container { display: none; }
    body { overflow-y: auto; height: auto; min-height: 100vh; }
    .content { height: auto; gap: 25px; padding: 20px; }
    .top-bar { flex-direction: column; gap: 12px; align-items: stretch; }
    .nav-links { justify-content: flex-start; }
    .bottom-bar { flex-direction: column; align-items: flex-start; gap: 15px; }
    .taglines { text-align: left; }
    .logo h1 { font-size: 64px; }
}