/* WorldNav Demo Styles */

:root {
    --bg-primary: #0f0f1a;
    --bg-secondary: #1a1a2e;
    --bg-card: #252540;
    --text-primary: #ffffff;
    --text-secondary: #a0a0c0;
    --accent: #6366f1;
    --accent-hover: #818cf8;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --border: #3a3a5a;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    border-bottom: 1px solid var(--border);
    margin-bottom: 30px;
}

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

.nav {
    display: flex;
    gap: 20px;
}

.nav a {
    color: var(--text-secondary);
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.2s;
}

.nav a:hover,
.nav a.active {
    color: var(--text-primary);
    background: var(--bg-secondary);
}

/* Demo Layout */
.demo-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 20px;
    align-items: start;
}

/* Map Wrapper */
.map-wrapper {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 20px;
    border: 1px solid var(--border);
}

.canvas-container {
    position: relative;
    display: inline-block;
    background: var(--bg-secondary);
    border-radius: 8px;
    overflow: hidden;
}

.canvas-container canvas {
    display: block;
}

#pathCanvas {
    position: absolute;
    top: 0;
    left: 0;
}

/* Avatar */
#avatar {
    position: absolute;
    width: 24px;
    height: 24px;
    background: linear-gradient(135deg, var(--accent), #a855f7);
    border-radius: 50%;
    border: 3px solid white;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.5);
    display: none;
    z-index: 10;
    transition: none;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        box-shadow: 0 4px 15px rgba(99, 102, 241, 0.5);
    }

    50% {
        box-shadow: 0 4px 25px rgba(99, 102, 241, 0.8);
    }
}

/* Controls Panel */
.controls-panel {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.control-section {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 20px;
    border: 1px solid var(--border);
}

.control-section h3 {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group:last-child {
    margin-bottom: 0;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.select-input {
    width: 100%;
    padding: 12px 16px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 0.95rem;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23a0a0c0' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
}

.select-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.select-input:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Buttons */
.btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 24px;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 700;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    width: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent), #a855f7);
    color: white;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

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

/* Info Panel */
.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
}

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

.info-row .label {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.info-row .value {
    font-weight: 600;
}

/* Status colors */
.status-ready {
    color: var(--text-secondary);
}

.status-calculating {
    color: var(--warning);
}

.status-moving {
    color: var(--accent);
}

.status-arrived {
    color: var(--success);
}

.status-error {
    color: var(--danger);
}

/* Responsive */
@media (max-width: 900px) {
    .demo-layout {
        grid-template-columns: 1fr;
    }

    .controls-panel {
        order: -1;
    }
}