/* ========================================
   Solar System Simulator - Main Styles
   ======================================== */

/* CSS Variables */
:root {
    --bg-space: #0a0a1a;
    --bg-panel: rgba(20, 20, 40, 0.9);
    --bg-control: rgba(30, 30, 60, 0.95);
    --text-primary: #e0e0ff;
    --text-secondary: #8080a0;
    --accent-primary: #6060ff;
    --accent-glow: #4040ff;
    --border-color: rgba(100, 100, 200, 0.3);
    --shadow-glow: 0 0 20px rgba(100, 100, 255, 0.3);
}

/* Reset & Base */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html,
body {
    height: 100%;
    overflow: hidden;
}

body {
    font-family: 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg-space);
    color: var(--text-primary);
    line-height: 1.6;
}

/* App Container */
.app-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1.5rem;
    background: var(--bg-panel);
    border-bottom: 1px solid var(--border-color);
    position: relative;
    z-index: 100;
    /* Above 3D canvas */
}

.header h1 {
    font-size: 1.5rem;
    font-weight: 600;
    background: linear-gradient(135deg, #fff, #a0a0ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.time-display {
    font-size: 1.1rem;
    color: var(--text-secondary);
    font-family: 'Consolas', 'Monaco', monospace;
}

/* Main Content */
.main-content {
    flex: 1;
    position: relative;
    overflow: hidden;
}

#solar-canvas {
    width: 100%;
    height: 100%;
    display: block;
    cursor: grab;
}

#solar-canvas:active {
    cursor: grabbing;
}

/* Info Panel */
.info-panel {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 220px;
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1rem;
    box-shadow: var(--shadow-glow);
    backdrop-filter: blur(10px);
    z-index: 100;
    /* Above 3D canvas */
}

.info-panel h2 {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
}

.info-content .hint {
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-style: italic;
}

.info-content .planet-name {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.info-content .planet-stat {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    padding: 0.25rem 0;
    border-bottom: 1px solid rgba(100, 100, 200, 0.1);
}

.info-content .planet-stat .label {
    color: var(--text-secondary);
}

/* Moon Mini Canvas */
.moon-mini-canvas {
    display: block;
    margin: 0.75rem auto;
    border-radius: 12px;
    border: 1px solid rgba(100, 120, 200, 0.25);
    background: rgba(5, 5, 20, 0.6);
}

#moon-mini-container {
    text-align: center;
}

/* Controls Footer */
.controls {
    display: flex;
    gap: 2rem;
    padding: 0.75rem 1.5rem;
    background: var(--bg-control);
    border-top: 1px solid var(--border-color);
    flex-wrap: wrap;
    position: relative;
    z-index: 100;
    /* Above 3D canvas */
}

.control-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.control-group>label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    min-width: 60px;
}

.speed-controls,
.view-controls,
.display-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Buttons */
button {
    background: rgba(60, 60, 120, 0.6);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.2s ease;
}

button:hover {
    background: rgba(80, 80, 160, 0.8);
    border-color: var(--accent-primary);
    box-shadow: 0 0 10px rgba(100, 100, 255, 0.3);
}

button:active {
    transform: scale(0.95);
}

button svg {
    width: 1.2em;
    height: 1.2em;
    fill: none;
    stroke: currentColor;
    vertical-align: middle;
}

#speed-display {
    min-width: 40px;
    text-align: center;
    font-family: 'Consolas', 'Monaco', monospace;
    color: var(--accent-primary);
}

/* Date Controls */
.date-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.date-controls button {
    background: linear-gradient(135deg, #059669, #0d9488);
    white-space: nowrap;
}

.date-controls button:hover {
    background: linear-gradient(135deg, #10b981, #14b8a6);
}

#date-picker {
    background: rgba(30, 30, 60, 0.8);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 0.4rem 0.6rem;
    color: var(--text-primary);
    font-size: 0.85rem;
    cursor: pointer;
}

#date-picker::-webkit-calendar-picker-indicator {
    filter: invert(1);
    cursor: pointer;
}

#current-date {
    font-size: 0.85rem;
    color: var(--text-secondary);
    min-width: 100px;
}

/* Checkboxes */
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.9rem;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    transition: background 0.2s;
}

.checkbox-label:hover {
    background: rgba(100, 100, 200, 0.2);
}

.checkbox-label input[type="checkbox"] {
    accent-color: var(--accent-primary);
    width: 16px;
    height: 16px;
}

/* Responsive */
@media (max-width: 768px) {
    .header h1 {
        font-size: 1.2rem;
    }

    .info-panel {
        width: 180px;
        padding: 0.75rem;
    }

    .controls {
        gap: 1rem;
        padding: 0.5rem 1rem;
    }

    .control-group>label {
        display: none;
    }
}

/* Header Right */
.header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.ai-toggle-btn {
    font-size: 1.4rem;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, #7c3aed, #2563eb);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 25px;
    box-shadow: 0 0 15px rgba(124, 58, 237, 0.5);
    animation: pulse-glow 2s ease-in-out infinite;
}

.mode-toggle-btn {
    padding: 0.4rem 1rem;
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-radius: 20px;
    font-weight: bold;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    min-width: 60px;
}

.mode-toggle-btn:hover {
    background: linear-gradient(135deg, #3b82f6, #60a5fa);
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.5);
}

.mode-toggle-btn.active-3d {
    background: linear-gradient(135deg, #7c3aed, #8b5cf6);
    box-shadow: 0 0 10px rgba(124, 58, 237, 0.4);
}

.ai-toggle-btn::after {
    content: ' AI Chat';
    font-size: 0.9rem;
    font-weight: 600;
}

.ai-toggle-btn:hover {
    background: linear-gradient(135deg, #8b5cf6, #3b82f6);
    box-shadow: 0 0 25px rgba(124, 58, 237, 0.8);
    transform: scale(1.05);
}

@keyframes pulse-glow {

    0%,
    100% {
        box-shadow: 0 0 15px rgba(124, 58, 237, 0.5);
    }

    50% {
        box-shadow: 0 0 25px rgba(124, 58, 237, 0.8);
    }
}

/* AI Chat Panel */
.ai-panel {
    position: absolute;
    top: 1rem;
    left: 1rem;
    width: 320px;
    max-height: calc(100% - 2rem);
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: var(--shadow-glow);
    backdrop-filter: blur(10px);
    display: none;
    flex-direction: column;
    z-index: 100;
    /* Above 3D canvas (z-index: 1) */
}

.ai-panel.active {
    display: flex;
}

.ai-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border-color);
}

.ai-panel-header h2 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.ai-close-btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.9rem;
    background: transparent;
    border: none;
}

.ai-close-btn:hover {
    color: #ff6060;
    background: rgba(255, 100, 100, 0.2);
}

/* Chat Messages */
.ai-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-height: 400px;
}

.ai-message {
    padding: 0.75rem 1rem;
    border-radius: 12px;
    font-size: 0.9rem;
    line-height: 1.5;
}

.ai-message p {
    margin: 0;
}

.ai-message-user {
    background: linear-gradient(135deg, rgba(60, 60, 150, 0.8), rgba(80, 80, 180, 0.6));
    align-self: flex-end;
    max-width: 85%;
}

.ai-message-assistant {
    background: rgba(40, 40, 80, 0.8);
    align-self: flex-start;
    max-width: 85%;
    border: 1px solid rgba(100, 100, 200, 0.2);
}

.ai-message-loading {
    color: var(--text-secondary);
    font-style: italic;
}

/* Chat Input */
.ai-chat-input {
    display: flex;
    gap: 0.5rem;
    padding: 0.75rem;
    border-top: 1px solid var(--border-color);
}

.ai-chat-input input {
    flex: 1;
    background: rgba(30, 30, 60, 0.8);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.6rem 1rem;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.ai-chat-input input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 8px rgba(100, 100, 255, 0.3);
}

.ai-chat-input input::placeholder {
    color: var(--text-secondary);
}

#btn-ai-send {
    padding: 0.6rem 1rem;
    font-size: 1rem;
    background: linear-gradient(135deg, var(--accent-primary), #4080ff);
}

#btn-ai-send:hover {
    background: linear-gradient(135deg, #7070ff, #5090ff);
}

/* AI Info in Planet Panel */
.ai-info {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-color);
}

.ai-info .ai-loading {
    color: var(--text-secondary);
    font-style: italic;
    font-size: 0.85rem;
}

.ai-info .ai-response {
    font-size: 0.85rem;
    line-height: 1.5;
    color: var(--text-primary);
}

.ai-info .ai-response p {
    margin-bottom: 0.5rem;
}

/* Click hint */
.click-for-ai {
    margin-top: 0.5rem;
    font-size: 0.8rem;
    color: var(--accent-primary);
    cursor: pointer;
}

.click-for-ai:hover {
    text-decoration: underline;
}

/* Help Button */
.help-toggle-btn {
    font-size: 1.2rem;
    padding: 0.5rem 0.8rem;
    background: linear-gradient(135deg, #059669, #10b981);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.4);
}

.help-toggle-btn:hover {
    background: linear-gradient(135deg, #10b981, #34d399);
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.6);
    transform: scale(1.05);
}

/* Help Panel */
.help-panel {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 400px;
    max-height: 80vh;
    background: var(--bg-panel);
    border: 2px solid var(--accent-primary);
    border-radius: 16px;
    box-shadow: 0 0 40px rgba(100, 100, 255, 0.4);
    backdrop-filter: blur(15px);
    display: none;
    flex-direction: column;
    z-index: 1000;
    overflow: hidden;
}

.help-panel.active {
    display: flex;
}

.help-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    background: linear-gradient(135deg, rgba(100, 100, 255, 0.2), rgba(50, 50, 150, 0.2));
    border-bottom: 1px solid var(--border-color);
}

.help-panel-header h2 {
    font-size: 1.2rem;
    margin: 0;
}

.help-close-btn {
    font-size: 1.2rem;
    padding: 0.3rem 0.6rem;
    background: rgba(255, 100, 100, 0.2);
    border-radius: 8px;
}

.help-close-btn:hover {
    background: rgba(255, 100, 100, 0.4);
}

.help-content {
    padding: 1rem 1.25rem;
    overflow-y: auto;
}

.help-section {
    margin-bottom: 1.25rem;
}

.help-section:last-child {
    margin-bottom: 0;
}

.help-section h3 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
    color: var(--accent-primary);
}

.help-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.help-section li {
    font-size: 0.9rem;
    padding: 0.3rem 0;
    color: var(--text-secondary);
}


/* App Footer */
.app-footer {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    background: var(--bg-control);
    border-top: 1px solid var(--border-color);
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.app-footer span {
    opacity: 0.8;
}

/* Comparison Panel */
.comparison-panel {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 500px;
    max-height: 80vh;
    background: var(--bg-panel);
    border: 2px solid var(--accent-secondary);
    border-radius: 16px;
    box-shadow: 0 0 40px rgba(100, 200, 150, 0.3);
    backdrop-filter: blur(15px);
    display: none;
    flex-direction: column;
    z-index: 1000;
    overflow: hidden;
}

.comparison-panel.active {
    display: flex;
}

.comparison-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    background: rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid var(--border-color);
}

.comparison-panel-header h2 {
    font-size: 1.1rem;
    margin: 0;
}

.comparison-selectors {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.2);
}

.comparison-selectors select {
    background: rgba(30, 30, 60, 0.8);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.5rem 1rem;
    color: var(--text-primary);
    font-size: 1rem;
    cursor: pointer;
    min-width: 120px;
}

.comparison-selectors select:focus {
    outline: none;
    border-color: var(--accent-primary);
}

.vs-label {
    color: var(--text-secondary);
    font-weight: bold;
}

.comparison-content {
    padding: 1rem;
    overflow-y: auto;
}

.comparison-header {
    display: flex;
    justify-content: space-around;
    align-items: center;
    margin-bottom: 1rem;
}

.comparison-header .planet-name {
    font-size: 1.3rem;
    font-weight: bold;
}

.comparison-header .vs {
    color: var(--text-secondary);
    font-size: 1rem;
}

.size-comparison {
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 1rem;
    margin-bottom: 1rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
}

.planet-circle {
    border-radius: 50%;
    opacity: 0.9;
}

.comparison-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.comparison-table th,
.comparison-table td {
    padding: 0.6rem 0.5rem;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.comparison-table th {
    background: rgba(100, 100, 200, 0.2);
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
}

.comparison-table .property-name {
    text-align: left;
    font-weight: 500;
}

.comparison-table .value {
    font-family: 'Consolas', 'Monaco', monospace;
}

.comparison-table .ratio {
    color: var(--accent-secondary);
    font-weight: bold;
}

/* Compare Toggle Button */
.compare-toggle-btn {
    padding: 0.4rem 0.8rem;
    background: linear-gradient(135deg, #059669, #10b981);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 15px;
    font-weight: bold;
    font-size: 0.85rem;
    transition: all 0.3s ease;
}

.compare-toggle-btn:hover {
    background: linear-gradient(135deg, #10b981, #34d399);
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.5);
}

/* Keyboard Notification */
.keyboard-notification {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: rgba(0, 0, 0, 0.85);
    color: #fff;
    padding: 0.75rem 1.5rem;
    border-radius: 30px;
    font-size: 1rem;
    font-weight: 500;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
    z-index: 2000;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
}

.keyboard-notification.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Distance Calculator Panel */
.distance-panel {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 450px;
    max-height: 85vh;
    background: var(--bg-panel);
    border: 2px solid #f59e0b;
    border-radius: 16px;
    box-shadow: 0 0 40px rgba(245, 158, 11, 0.3);
    backdrop-filter: blur(15px);
    display: none;
    flex-direction: column;
    z-index: 1000;
    overflow: hidden;
}

.distance-panel.active {
    display: flex;
}

.distance-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    background: rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid var(--border-color);
}

.distance-panel-header h2 {
    font-size: 1.1rem;
    margin: 0;
}

.distance-selectors {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.2);
}

.distance-selectors select {
    background: rgba(30, 30, 60, 0.8);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.5rem 1rem;
    color: var(--text-primary);
    font-size: 1rem;
    cursor: pointer;
    min-width: 120px;
}

.arrow-label {
    color: #f59e0b;
    font-size: 1.5rem;
    font-weight: bold;
}

.distance-content {
    padding: 1rem;
    overflow-y: auto;
}

.distance-header {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.distance-header .body-name {
    font-weight: bold;
    color: #f59e0b;
}

.distance-header .arrow {
    color: var(--text-secondary);
}

.distance-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.distance-stats .stat {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    padding: 0.75rem;
    text-align: center;
}

.distance-stats .stat.highlight {
    background: rgba(245, 158, 11, 0.2);
    border: 1px solid rgba(245, 158, 11, 0.4);
}

.stat-label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
}

.stat-value {
    display: block;
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--text-primary);
}

.stat-sub {
    display: block;
    font-size: 0.7rem;
    color: var(--text-secondary);
    margin-top: 0.2rem;
}

.distance-content h4 {
    margin: 0 0 0.75rem 0;
    font-size: 1rem;
    color: var(--text-primary);
}

.travel-time-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

.travel-time-table th,
.travel-time-table td {
    padding: 0.5rem;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.travel-time-table th {
    background: rgba(100, 100, 200, 0.2);
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
}

.travel-time-table .vehicle {
    font-weight: 500;
}

.travel-time-table .speed {
    color: var(--text-secondary);
    font-family: 'Consolas', monospace;
    font-size: 0.8rem;
}

.travel-time-table .time {
    color: #f59e0b;
    font-weight: bold;
}

.light-time {
    background: rgba(100, 100, 200, 0.15);
    border-radius: 8px;
    padding: 0.75rem;
    font-size: 0.9rem;
    text-align: center;
}

.same-body {
    text-align: center;
    color: var(--text-secondary);
    padding: 2rem;
}

/* Distance Toggle Button */
.distance-toggle-btn {
    padding: 0.4rem 0.8rem;
    background: linear-gradient(135deg, #d97706, #f59e0b);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 15px;
    font-weight: bold;
    font-size: 0.85rem;
    transition: all 0.3s ease;
}

.distance-toggle-btn:hover {
    background: linear-gradient(135deg, #f59e0b, #fbbf24);
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(245, 158, 11, 0.5);
}

/* Eclipse Toggle Button */
.eclipse-toggle-btn {
    padding: 0.4rem 0.8rem;
    background: linear-gradient(135deg, #4b5563, #6b7280);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 15px;
    font-weight: bold;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.eclipse-toggle-btn:hover {
    background: linear-gradient(135deg, #6b7280, #9ca3af);
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(107, 114, 128, 0.5);
}

.eclipse-toggle-btn.active {
    background: linear-gradient(135deg, #1e3a5f, #2563eb);
    box-shadow: 0 0 15px rgba(37, 99, 235, 0.6);
}

/* Planet Focus View Overlay */
.planet-focus-overlay {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: none;
    background: #050510;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.planet-focus-overlay.active {
    display: block;
    opacity: 1;
}

.focus-header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    z-index: 10;
    background: linear-gradient(to bottom, rgba(5, 5, 20, 0.8), transparent);
}

.focus-back-btn {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: white;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.focus-back-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: none;
}

.focus-back-btn svg {
    width: 16px;
    height: 16px;
}

.focus-planet-name {
    font-size: 1.4rem;
    font-weight: 700;
    color: white;
}

.focus-subtitle {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.5);
    font-style: italic;
}

.focus-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.focus-moon-info {
    position: absolute;
    bottom: 2rem;
    right: 2rem;
    width: 220px;
    z-index: 10;
}

.focus-hint {
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.85rem;
    font-style: italic;
    text-align: center;
}

.focus-moon-detail {
    background: rgba(10, 10, 40, 0.85);
    border: 1px solid rgba(100, 120, 200, 0.3);
    border-radius: 12px;
    padding: 1rem;
    backdrop-filter: blur(10px);
}

.focus-moon-name {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.focus-moon-stat {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    padding: 0.2rem 0;
    color: rgba(255, 255, 255, 0.75);
    border-bottom: 1px solid rgba(100, 120, 200, 0.1);
}

.focus-moon-stat span:first-child {
    color: rgba(255, 255, 255, 0.5);
}

/* Eclipse Panel */
.eclipse-panel {
    position: absolute;
    top: 1rem;
    left: 1rem;
    width: 280px;
    max-height: calc(100% - 2rem);
    background: var(--bg-panel);
    border: 2px solid #3b82f6;
    border-radius: 12px;
    box-shadow: 0 0 30px rgba(59, 130, 246, 0.3);
    backdrop-filter: blur(10px);
    display: none;
    flex-direction: column;
    z-index: 100;
    overflow: hidden;
}

.eclipse-panel.visible {
    display: flex;
}

.eclipse-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(30, 58, 95, 0.3));
    border-bottom: 1px solid var(--border-color);
}

.eclipse-panel-header h2 {
    font-size: 1rem;
    margin: 0;
}

.eclipse-content {
    padding: 1rem;
    overflow-y: auto;
}

/* Eclipse Toggle Switch */
.eclipse-toggle-section {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.eclipse-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
}

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

.eclipse-switch .slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(100, 100, 120, 0.5);
    transition: 0.3s;
    border-radius: 26px;
}

.eclipse-switch .slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background: white;
    transition: 0.3s;
    border-radius: 50%;
}

.eclipse-switch input:checked+.slider {
    background: linear-gradient(135deg, #2563eb, #3b82f6);
}

.eclipse-switch input:checked+.slider:before {
    transform: translateX(24px);
}

/* Moon Phase Display */
.eclipse-info-section {
    margin-bottom: 1rem;
}

.moon-phase {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.moon-phase .phase-icon {
    font-size: 1.5rem;
}

.moon-phase .phase-name {
    font-size: 0.9rem;
    color: var(--text-primary);
}

/* Eclipse Status */
.eclipse-status {
    padding: 0.5rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    text-align: center;
}

.eclipse-status .status-text {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.eclipse-status.active {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.3), rgba(59, 130, 246, 0.2));
    border: 1px solid rgba(139, 92, 246, 0.5);
}

.eclipse-active {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.eclipse-type {
    font-weight: bold;
    font-size: 1rem;
}

.eclipse-type.solar-total,
.eclipse-type.solar-annular {
    color: #fbbf24;
}

.eclipse-type.lunar-total {
    color: #f87171;
}

.eclipse-type.lunar-partial,
.eclipse-type.lunar-penumbral {
    color: #fb923c;
}

.eclipse-magnitude {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.magnitude-bar {
    flex: 1;
    height: 6px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
    overflow: hidden;
}

.magnitude-fill {
    height: 100%;
    background: linear-gradient(90deg, #8b5cf6, #3b82f6);
    transition: width 0.3s;
}

/* Eclipse Navigation */
.eclipse-nav-section {
    margin-bottom: 1rem;
}

.eclipse-nav-section h3 {
    font-size: 0.85rem;
    margin-bottom: 0.75rem;
    color: var(--text-secondary);
}

.eclipse-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-height: 200px;
    overflow-y: auto;
}

.eclipse-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    transition: background 0.2s;
}

.eclipse-item:hover {
    background: rgba(59, 130, 246, 0.2);
}

.eclipse-item.solar {
    border-left: 3px solid #fbbf24;
}

.eclipse-item.lunar {
    border-left: 3px solid #f87171;
}

.eclipse-icon {
    font-size: 1.1rem;
}

.eclipse-details {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.eclipse-date {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.eclipse-name {
    font-size: 0.9rem;
    font-weight: 500;
}

.jump-btn {
    padding: 0.3rem 0.5rem;
    font-size: 0.9rem;
    background: rgba(59, 130, 246, 0.3);
    border: none;
    border-radius: 4px;
}

.jump-btn:hover {
    background: rgba(59, 130, 246, 0.6);
}

/* Eclipse Options */
.eclipse-options {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-color);
}