:root {
    --bg-color: #121212;
    --surface-color: #1e1e1e;
    --primary-color: #bb86fc;
    --text-color: #e0e0e0;
    --secondary-text: #b0b0b0;
    --hover-color: #2c2c2c;
    --border-color: #333;
    --nav-bg: #2c3e50;
    --nav-hover: #1abc9c;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    margin: 0;
    padding: 0;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Header & Nav */
header {
    background-color: var(--surface-color);
    color: var(--text-color);
    padding: 0; /* Reset padding as nav might handle it */
    text-align: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
    z-index: 10;
    position: relative;
}

.logo-link {
    position: absolute;
    left: 1.5rem;
    top: 1.5rem; /* Aligns with the H1 padding roughly */
    font-weight: 700;
    font-size: 1.2rem;
    text-decoration: none;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    line-height: 1;
}

.logo-link:hover {
    color: var(--text-color);
    text-decoration: none;
}

header h1 {
    margin: 0;
    padding: 1rem 0;
    font-size: 1.8rem;
    color: var(--primary-color);
}

nav ul {
    list-style: none;
    padding: 0;
    display: flex;
    justify-content: center;
    background-color: #333; /* Slightly lighter than surface */
    margin: 0;
}

nav ul li a {
    color: var(--text-color);
    text-decoration: none;
    padding: 0.8rem 1.2rem;
    display: block;
    transition: background-color 0.3s ease, color 0.3s ease;
}

nav ul li a:hover {
    background-color: var(--primary-color);
    color: #000;
}

nav ul li span {
    padding: 0.8rem 1.2rem;
    display: block;
    color: var(--primary-color);
}

/* Main Content */
.container, main {
    flex: 1;
    max-width: 960px;
    margin: 2rem auto;
    padding: 1rem;
    background: var(--surface-color);
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    width: 90%; /* Responsive width */
    box-sizing: border-box;
}

/* Links within content */
a {
    color: var(--primary-color);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Static Index Specifics */
.intro {
    margin-bottom: 2rem;
    line-height: 1.6;
    color: var(--secondary-text);
}

.link-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.link-item {
    background-color: var(--bg-color); /* Contrast against surface */
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    transition: transform 0.2s, background-color 0.2s;
    text-decoration: none;
    color: inherit;
    display: block;
}

.link-item:hover {
    background-color: var(--hover-color);
    transform: translateY(-2px);
    border-color: var(--primary-color);
    text-decoration: none;
}

.link-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    display: block;
}

.link-desc {
    font-size: 0.95rem;
    color: var(--secondary-text);
    line-height: 1.4;
    display: block;
}

/* Footer */
footer {
    text-align: center;
    padding: 1rem;
    margin-top: auto;
    color: var(--secondary-text);
    font-size: 0.9rem;
    border-top: 1px solid var(--border-color);
    background-color: var(--surface-color);
}

/* Form Styles */
input[type="text"], input[type="password"] {
    background-color: var(--bg-color);
    color: var(--text-color);
    border: 1px solid var(--border-color);
}

input[type="submit"], button {
    background-color: var(--primary-color);
    color: #000;
    border: none;
}

input[type="submit"]:hover, button:hover {
    opacity: 0.9;
}
