:root {
    --bg-obsidian: #050505;
    --panel-bg: #121212;
    --accent-amber: #ffb000;
    --accent-gold: #ffcc00;
    --text-main: #e0e0e0;
    --text-dim: #8b949e;
    --border-muted: #262626;
    --success: #238636;
    --error: #ff6b6b;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--bg-obsidian);
    color: var(--text-main);
}

#canvas-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

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

header {
    text-align: center;
    margin-bottom: 10px;
}

header h1 {
    margin: 0;
    font-size: 4rem;
    letter-spacing: 4px;
    background: linear-gradient(to right, var(--accent-amber), #ff8c00);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 40px rgba(255, 176, 0, 0.6), 0 0 40px rgba(255, 176, 0, 0.2);
    display: inline-block;
}

header p {
    margin-top: 10px;
    font-size: 1.2rem;
    color: var(--text-dim);
    font-weight: 500;
}

.dashboard {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 20px;
}

.panel {
    background: var(--panel-bg);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.8);
    border: 1px solid var(--border-muted);
}

.panel h2 {
    margin-top: 0;
    margin-bottom: 5px;
    border-bottom: 2px solid var(--border-muted);
    padding-bottom: 5px;
    font-size: 1.2rem;
    color: var(--accent-amber);
}

.panel-subtext {
    font-size: 0.85rem;
    color: var(--text-dim);
    margin-bottom: 15px;
    margin-top: 0;
}

form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

label {
    display: flex;
    align-items: center;
    font-size: 0.9rem;
    gap: 8px;
}

form > label {
    display: grid;
    grid-template-columns: 45% 55%;
    gap: 10px;
    align-items: center;
}

input, select {
    padding: 8px;
    background: var(--bg-obsidian);
    color: var(--text-main);
    border: 1px solid var(--text-dim);
    border-radius: 4px;
    width: 100%;
    box-sizing: border-box;
    transition: border-color 0.2s, box-shadow 0.2s;
}

input:hover, select:hover, input:focus, select:focus {
    border-color: var(--accent-amber);
    box-shadow: 0 0 5px rgba(255, 176, 0, 0.2);
    outline: none;
}

button {
    background: var(--accent-amber);
    color: #000;
    border: none;
    padding: 10px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    margin-top: 10px;
    transition: background-color 0.2s, transform 0.1s;
}

button:hover:not(:disabled) {
    background: var(--accent-gold);
}

button:active:not(:disabled) {
    transform: scale(0.98);
}

#skyplot, #iq-canvas {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 20px auto 0;
    border: 1px solid var(--border-muted);
    background-color: var(--bg-obsidian);
    border-radius: 8px;
    padding: 15px;
    box-sizing: border-box;
    max-width: 100%;
}

.pass-info-card {
    width: 100%;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--border-muted);
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
}

.info-item {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: var(--text-main);
    background: rgba(255, 176, 0, 0.05);
    padding: 8px 12px;
    border-radius: 4px;
    border: 1px solid var(--border-muted);
}

.info-item strong {
    color: var(--accent-amber);
}

#link-result {
    margin-top: 20px;
}

.result-card {
    padding: 15px;
    background: rgba(255, 176, 0, 0.05);
    border: 1px solid var(--border-muted);
    border-radius: 6px;
    transition: border-color 0.3s;
}

.result-card.success {
    border-color: var(--success);
}

.result-card.error {
    border-color: var(--error);
}

#link-result h3 {
    margin-top: 0;
}

#link-result ul {
    padding-left: 20px;
}

.spinner {
  display: inline-block;
  width: 1em;
  height: 1em;
  border: 2px solid rgba(255, 176, 0, 0.3);
  border-radius: 50%;
  border-top-color: var(--accent-amber);
  animation: spin 1s ease-in-out infinite;
  margin-right: 8px;
  vertical-align: middle;
}

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

/* Accessibility Improvements */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

.skip-link {
    position: absolute;
    top: -100px;
    left: 0;
    background: var(--accent-amber);
    color: #000;
    padding: 10px 15px;
    z-index: 1000;
    text-decoration: none;
    font-weight: bold;
    border-radius: 0 0 4px 4px;
    transition: top 0.2s;
}

.skip-link:focus {
    top: 0;
}

/* Enhanced Focus Visibility */
*:focus-visible {
    outline: 2px solid var(--accent-amber);
    outline-offset: 2px;
}

/* Error Alert Styles */
.error-alert {
    color: #ffb000;
    background-color: rgba(255, 176, 0, 0.1);
    padding: 10px;
    border-radius: 6px;
    margin-top: 10px;
    border: 1px solid rgba(255, 176, 0, 0.4);
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Form Validation Feedback */
input:invalid {
    border-color: var(--error);
    outline-color: var(--error);
}

label small {
    font-size: 0.85em;
    color: var(--text-dim);
    font-weight: normal;
    margin-left: 4px;
}

button:disabled {
    background: #21262d;
    color: var(--text-dim);
    border: 1px solid var(--border-muted);
    cursor: not-allowed;
    opacity: 0.8;
}

/* Domain Tooltips for Abbreviations */
abbr[title] {
    text-decoration: underline dotted var(--text-dim);
    text-underline-offset: 3px;
    cursor: help;
}

footer {
    text-align: center;
    margin-top: 40px;
    padding: 20px 0;
    border-top: 1px solid var(--border-muted);
    font-size: 0.9rem;
    color: var(--text-dim);
}

footer a {
    color: var(--accent-amber);
    text-decoration: none;
    transition: color 0.2s, text-shadow 0.2s;
}

footer a:hover {
    color: var(--accent-gold);
    text-shadow: 0 0 8px rgba(255, 176, 0, 0.4);
}

