/**
 * Sentinel XR Client Styles
 * Sci-fi aesthetic with cyan/magenta accents
 */

:root {
    --bg-dark: #0a0a1a;
    --bg-panel: #0d1525;
    --accent-cyan: #00d4ff;
    --accent-magenta: #ff00ff;
    --accent-green: #00ff88;
    --text-primary: #ffffff;
    --text-secondary: #88ccff;
    --text-muted: #4a6a8a;
    --border-color: rgba(0, 212, 255, 0.3);
    --glow-cyan: 0 0 20px rgba(0, 212, 255, 0.5);
    --glow-magenta: 0 0 20px rgba(255, 0, 255, 0.5);
}

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

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

/* Canvas */
#xr-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: block;
}

/* Dialog Overlay */
.dialog {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--bg-dark) 0%, #0d1a2a 100%);
    z-index: 100;
}

.dialog-content {
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 40px;
    max-width: 400px;
    width: 90%;
    text-align: center;
    box-shadow: var(--glow-cyan), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    animation: dialogFadeIn 0.3s ease-out;
}

@keyframes dialogFadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Logo */
.logo {
    margin-bottom: 16px;
}

.logo svg {
    animation: logoPulse 3s ease-in-out infinite;
}

@keyframes logoPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

h1 {
    font-family: 'Orbitron', sans-serif;
    font-size: 28px;
    font-weight: 700;
    letter-spacing: 4px;
    color: var(--accent-cyan);
    margin-bottom: 4px;
}

.subtitle {
    font-size: 14px;
    color: var(--text-muted);
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 32px;
}

/* Form Inputs */
.input-group {
    margin-bottom: 20px;
    text-align: left;
}

.input-group label {
    display: block;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.input-group input {
    width: 100%;
    padding: 12px 16px;
    font-family: 'Rajdhani', sans-serif;
    font-size: 16px;
    font-weight: 500;
    color: var(--text-primary);
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    outline: none;
    transition: all 0.2s ease;
}

.input-group select {
    width: 100%;
    padding: 12px 16px;
    font-family: 'Rajdhani', sans-serif;
    font-size: 16px;
    font-weight: 500;
    color: var(--text-primary);
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    outline: none;
    transition: all 0.2s ease;
}

.input-group input:focus {
    border-color: var(--accent-cyan);
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.3);
}

.input-group select:focus {
    border-color: var(--accent-cyan);
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.3);
}

.input-group input::placeholder {
    color: var(--text-muted);
}

.inline-input-row {
    display: flex;
    gap: 8px;
    align-items: center;
}

.btn-inline {
    padding: 10px 12px;
    min-width: 90px;
    font-family: 'Rajdhani', sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-inline:hover {
    color: var(--text-primary);
    border-color: var(--accent-cyan);
}

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

/* Buttons */
.btn-primary {
    width: 100%;
    padding: 14px 24px;
    font-family: 'Orbitron', sans-serif;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--bg-dark);
    background: linear-gradient(135deg, var(--accent-cyan), #0099cc);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--glow-cyan);
}

.btn-primary:active {
    transform: translateY(0);
}

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

.btn-text {
    position: relative;
    z-index: 1;
}

.btn-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid transparent;
    border-top-color: var(--bg-dark);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

.btn-vr {
    width: 100%;
    padding: 20px 24px;
    font-family: 'Orbitron', sans-serif;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 3px;
    color: var(--text-primary);
    background: linear-gradient(135deg, var(--accent-magenta), #aa00aa);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 16px;
    transition: all 0.2s ease;
}

.btn-vr:hover {
    transform: translateY(-2px);
    box-shadow: var(--glow-magenta);
}

.btn-secondary {
    padding: 10px 20px;
    font-family: 'Rajdhani', sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-secondary:hover {
    color: var(--text-primary);
    border-color: var(--accent-cyan);
}

.btn-mode-toggle {
    width: 100%;
    margin-bottom: 12px;
}

.btn-mode-toggle:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

/* Status Message */
.status-message {
    margin-top: 20px;
    padding: 12px 16px;
    font-size: 13px;
    border-radius: 6px;
    animation: fadeIn 0.2s ease;
}

.status-message.error {
    color: #ff6666;
    background: rgba(255, 68, 68, 0.1);
    border: 1px solid rgba(255, 68, 68, 0.3);
}

.status-message.success {
    color: var(--accent-green);
    background: rgba(0, 255, 136, 0.1);
    border: 1px solid rgba(0, 255, 136, 0.3);
}

.status-message.info {
    color: var(--accent-cyan);
    background: rgba(0, 212, 255, 0.1);
    border: 1px solid rgba(0, 212, 255, 0.3);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Connection Info */
.connection-info {
    margin-bottom: 24px;
    padding: 16px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    text-align: left;
}

.info-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

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

.info-row .label {
    color: var(--text-muted);
    font-size: 13px;
}

.info-row .value {
    color: var(--accent-cyan);
    font-family: 'Orbitron', sans-serif;
    font-size: 13px;
}

/* Performance HUD */
#perf-hud {
    position: fixed;
    top: 16px;
    right: 16px;
    display: flex;
    gap: 16px;
    z-index: 50;
}

.hud-item {
    background: rgba(13, 21, 37, 0.9);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 8px 12px;
    text-align: center;
}

.hud-label {
    display: block;
    font-size: 10px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.hud-value {
    display: block;
    font-family: 'Orbitron', sans-serif;
    font-size: 16px;
    color: var(--accent-cyan);
}

/* Toast Notifications */
#toast-container {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 200;
}

.toast {
    padding: 12px 20px;
    font-size: 14px;
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    animation: toastSlide 0.3s ease-out;
    display: flex;
    align-items: center;
    gap: 12px;
}

.toast.error {
    border-color: rgba(255, 68, 68, 0.5);
}

.toast.success {
    border-color: rgba(0, 255, 136, 0.5);
}

.toast.warning {
    border-color: rgba(255, 170, 0, 0.5);
}

@keyframes toastSlide {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Hide elements */
[hidden] {
    display: none !important;
}

/* Responsive */
@media (max-width: 480px) {
    .dialog-content {
        padding: 24px;
    }

    h1 {
        font-size: 22px;
        letter-spacing: 2px;
    }

    .inline-input-row {
        flex-direction: column;
        align-items: stretch;
    }
}
