/* Jurassic Park 3D Slide Navigator - Styles */

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

:root {
    --bg-dark: #0a0a0f;
    --bg-panel: rgba(10, 10, 20, 0.85);
    --border-glow: rgba(0, 255, 255, 0.3);
    --text-primary: #e0e0e0;
    --text-secondary: #888;
    --accent-cyan: #00ffff;
    --accent-magenta: #ff00ff;
    --accent-green: #00ff88;
    --accent-yellow: #ffff00;
    --accent-orange: #ff8800;
    --accent-red: #ff4444;
}

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: var(--bg-dark);
    font-family: 'Courier New', monospace;
    color: var(--text-primary);
}

#canvas-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

canvas {
    display: block;
}

/* HUD Overlay */
#hud {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10;
}

#hud > * {
    pointer-events: auto;
}

/* Title Bar */
#title-bar {
    position: absolute;
    top: 20px;
    left: 20px;
    right: 20px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

#logo {
    display: flex;
    flex-direction: column;
}

#logo h1 {
    font-size: 24px;
    font-weight: bold;
    color: var(--accent-cyan);
    text-shadow: 0 0 10px var(--accent-cyan), 0 0 20px var(--accent-cyan);
    letter-spacing: 2px;
    text-transform: uppercase;
}

#logo .subtitle {
    font-size: 11px;
    color: var(--text-secondary);
    letter-spacing: 4px;
    margin-top: 4px;
}

#status-bar {
    display: flex;
    gap: 20px;
    align-items: center;
}

.status-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--text-secondary);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent-green);
    box-shadow: 0 0 6px var(--accent-green);
    animation: pulse 2s ease-in-out infinite;
}

.status-dot.warning {
    background: var(--accent-yellow);
    box-shadow: 0 0 6px var(--accent-yellow);
}

.status-dot.error {
    background: var(--accent-red);
    box-shadow: 0 0 6px var(--accent-red);
}

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

/* Breadcrumb Navigation */
#breadcrumb {
    position: absolute;
    top: 80px;
    left: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.crumb {
    color: var(--accent-cyan);
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s;
}

.crumb:hover {
    background: rgba(0, 255, 255, 0.1);
    text-shadow: 0 0 8px var(--accent-cyan);
}

.crumb.current {
    color: var(--text-primary);
    cursor: default;
}

.crumb.current:hover {
    background: transparent;
    text-shadow: none;
}

.crumb-separator {
    color: var(--text-secondary);
}

/* Info Panel */
#info-panel {
    position: absolute;
    bottom: 20px;
    left: 20px;
    min-width: 300px;
    max-width: 400px;
    background: var(--bg-panel);
    border: 1px solid var(--border-glow);
    border-radius: 8px;
    padding: 16px;
    backdrop-filter: blur(10px);
}

#info-panel h3 {
    font-size: 14px;
    color: var(--accent-cyan);
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

#info-panel .info-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 12px;
}

#info-panel .info-row:last-child {
    border-bottom: none;
}

#info-panel .info-label {
    color: var(--text-secondary);
}

#info-panel .info-value {
    color: var(--text-primary);
}

#info-panel .info-value.success {
    color: var(--accent-green);
}

#info-panel .info-value.warning {
    color: var(--accent-yellow);
}

#info-panel .info-value.error {
    color: var(--accent-red);
}

/* Action Panel */
#action-panel {
    position: absolute;
    bottom: 20px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    background: var(--bg-panel);
    border: 1px solid var(--border-glow);
    border-radius: 8px;
    color: var(--text-primary);
    font-family: 'Courier New', monospace;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    backdrop-filter: blur(10px);
}

.action-btn:hover {
    background: rgba(0, 255, 255, 0.1);
    border-color: var(--accent-cyan);
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.3);
}

.action-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.action-btn.primary {
    border-color: var(--accent-cyan);
    color: var(--accent-cyan);
}

.action-btn.danger {
    border-color: var(--accent-red);
    color: var(--accent-red);
}

.action-btn .icon {
    font-size: 18px;
}

/* Loading Overlay */
#loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-dark);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 100;
    transition: opacity 0.5s;
}

#loading-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 3px solid rgba(0, 255, 255, 0.1);
    border-top-color: var(--accent-cyan);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.loading-text {
    margin-top: 20px;
    color: var(--accent-cyan);
    font-size: 14px;
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* Restore Menu Modal */
#restore-menu {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--bg-panel);
    border: 2px solid var(--accent-cyan);
    border-radius: 12px;
    padding: 30px;
    min-width: 400px;
    backdrop-filter: blur(20px);
    box-shadow: 0 0 40px rgba(0, 255, 255, 0.3);
    display: none;
    z-index: 50;
}

#restore-menu.visible {
    display: block;
}

#restore-menu h2 {
    text-align: center;
    color: var(--accent-cyan);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 3px;
}

#restore-menu .snapshot-info {
    text-align: center;
    color: var(--text-secondary);
    font-size: 12px;
    margin-bottom: 30px;
}

#restore-menu .restore-options {
    display: flex;
    gap: 20px;
    justify-content: center;
}

.restore-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 30px 40px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.restore-option:hover {
    border-color: var(--accent-cyan);
    background: rgba(0, 255, 255, 0.05);
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(0, 255, 255, 0.2);
}

.restore-option .icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.restore-option.file .icon {
    color: var(--accent-green);
}

.restore-option.vm .icon {
    color: var(--accent-magenta);
}

.restore-option .label {
    font-size: 16px;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.restore-option .desc {
    font-size: 11px;
    color: var(--text-secondary);
    margin-top: 8px;
}

#restore-menu .close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 24px;
    cursor: pointer;
    transition: color 0.2s;
}

#restore-menu .close-btn:hover {
    color: var(--accent-red);
}

/* VNC Container */
#vnc-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: none;
    z-index: 60;
}

#vnc-container.visible {
    display: flex;
    flex-direction: column;
}

#vnc-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: var(--bg-panel);
    border-bottom: 1px solid var(--border-glow);
}

#vnc-header h3 {
    color: var(--accent-magenta);
    text-transform: uppercase;
    letter-spacing: 2px;
}

#vnc-screen {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

#vnc-screen canvas {
    max-width: 100%;
    max-height: 100%;
    border: 2px solid var(--accent-magenta);
    box-shadow: 0 0 30px rgba(255, 0, 255, 0.3);
}

/* Tooltip */
#tooltip {
    position: absolute;
    background: var(--bg-panel);
    border: 1px solid var(--border-glow);
    border-radius: 6px;
    padding: 10px 14px;
    font-size: 12px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s;
    z-index: 20;
    max-width: 250px;
}

#tooltip.visible {
    opacity: 1;
}

#tooltip .tooltip-title {
    color: var(--accent-cyan);
    font-weight: bold;
    margin-bottom: 4px;
}

#tooltip .tooltip-desc {
    color: var(--text-secondary);
}

/* Grid overlay effect */
#grid-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    background: 
        linear-gradient(rgba(0, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    z-index: 2;
    opacity: 0.5;
}

/* Scanline effect */
#scanlines {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 0, 0, 0.1),
        rgba(0, 0, 0, 0.1) 1px,
        transparent 1px,
        transparent 2px
    );
    z-index: 3;
    opacity: 0.3;
}

/* Keyboard Controls Hint */
#controls-hint {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background: var(--bg-panel);
    border: 1px solid var(--border-dim);
    border-radius: 6px;
    padding: 10px 14px;
    font-size: 11px;
    z-index: 10;
    opacity: 0.7;
    transition: opacity 0.2s;
}

#controls-hint:hover {
    opacity: 1;
    border-color: var(--border-glow);
}

#controls-hint .hint-title {
    color: var(--accent-cyan);
    font-weight: bold;
    font-size: 10px;
    letter-spacing: 1px;
    margin-bottom: 6px;
    border-bottom: 1px solid var(--border-dim);
    padding-bottom: 4px;
}

#controls-hint .hint-row {
    color: var(--text-secondary);
    margin: 4px 0;
    display: flex;
    align-items: center;
    gap: 4px;
}

#controls-hint kbd {
    display: inline-block;
    background: var(--bg-dark);
    border: 1px solid var(--border-dim);
    border-radius: 3px;
    padding: 1px 5px;
    font-family: 'Courier New', monospace;
    font-size: 10px;
    color: var(--text-primary);
    min-width: 18px;
    text-align: center;
}
