/* ============================================================================
   styles.css - Zentrale Stil-Definition für alle HTML-Dateien
   ============================================================================ */

/* BASICS & FONT */
body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    background: #0b1020; /* Sehr dunkler Hintergrund */
    color: #e5e7eb; /* Helle Schrift */
    padding: 32px;
    margin: 0;
}

h1 {
    font-size: 1.8rem;
    margin-top: 0;
    margin-bottom: 8px;
    font-weight: 700;
}

h2 {
    font-size: 1.15rem;
    margin-top: 24px;
    margin-bottom: 12px;
    font-weight: 600;
}

.subtitle {
    color: #9ca3af;
    max-width: 800px;
    line-height: 1.45;
    margin-bottom: 32px;
    font-size: 0.95rem;
}

/* CARDS & CONTAINERS */
.card {
    background: #020617;
    border: 1px solid #1f2933;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.06);
    transition: all 0.2s;
}

.card:hover {
    border-color: #334155; /* Leichter visueller Hinweis */
}

.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 28px;
}

.label {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: #9ca3af;
    letter-spacing: 0.08em;
    margin-bottom: 4px;
}

.value {
    font-size: 1.4rem;
    font-weight: 800;
    line-height: 1.2;
}

/* BUTTONS & INPUTS */
button, select {
    background: #2563eb;
    border: none;
    border-radius: 8px;
    padding: 10px 16px;
    font-size: 0.9rem;
    color: #fff;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.2s;
}

button:hover {
    background: #1d4ed8;
}

.secondary, .toggle {
    background: transparent;
    border: 1px solid #334155;
    color: #e5e7eb;
}

.secondary:hover, .toggle:hover {
    background: #1f2933;
}

input {
    width: 100%;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #1f2933;
    background: #020617;
    color: #e5e7eb;
    font-size: 0.95rem;
}

/* TEXT & HINTS */
ul {
    padding-left: 18px;
    margin: 0;
    font-size: 0.9rem;
}

li {
    margin-bottom: 6px;
}

pre {
    background: #020617;
    border: 1px solid #334155;
    border-radius: 10px;
    padding: 16px;
    font-size: 0.8rem;
    white-space: pre-wrap;
    max-height: 400px;
    overflow-y: auto;
    display: none;
    margin-top: 16px;
}

.hint {
    font-size: 0.85rem;
    color: #9ca3af;
    margin-top: 10px;
    max-width: 800px;
}

/* TABLES & DATA VISUALIZATION */
table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    margin-bottom: 24px;
}

th, td {
    padding: 10px 8px;
    border-bottom: 1px solid #1f2933;
    text-align: left;
}

th {
    color: #9ca3af;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
}

/* CONTEXTUAL COLORS (Status & Roles) */
/* Status Codes */
.status-200 { color: #4ade80; } /* OK - Grün */
.status-301, .status-302 { color: #facc15; } /* Redirect - Gelb/Warnung */
.status-404, .status-500 { color: #f87171; font-weight: 600; } /* Fehler - Rot */

/* Page Roles */
.cell-role {
    display: flex;
    align-items: center;
    gap: 8px;
}
.role-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}
.core .role-dot { background: #22c55e; } /* Core - Grün */
.support .role-dot { background: #93c5fd; } /* Support - Hellblau */
.peripheral .role-dot { background: #facc15; } /* Peripheral - Gelb */
.outlier .role-dot { background: #f87171; } /* Outlier - Rot */

/* THEMATIC COHESION SPECIFIC */
.cohesion-score-display {
    background: #1e293b; 
    border: 1px solid #334155;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 32px;
    text-align: center;
}

.score-value {
    font-size: 3.5rem; 
    font-weight: 900;
    color: #4ade80; 
    line-height: 1;
    margin-top: 8px;
}

.score-hint {
    color: #9ca3af;
    font-size: 0.95rem;
    margin-top: 10px;
}

/* ... (alles andere in styles.css beibehalten) ... */

/* NAVIGATION BAR */
.nav {
    background: #020617;
    border-bottom: 1px solid #1f2933;
    padding: 12px 32px;
    margin: -32px -32px 32px -32px; /* Dehnt die Nav über den Rand */
    display: flex;
    gap: 20px;
}

.nav a {
    color: #9ca3af;
    text-decoration: none;
    font-weight: 500;
    padding: 4px 0;
    transition: color 0.2s;
}

.nav a:hover {
    color: #e5e7eb;
}

.nav a.active {
    color: #4ade80; /* Hervorhebung der aktuellen Seite */
    border-bottom: 2px solid #4ade80;
}

/* TABLE ENHANCEMENT */
tbody tr:nth-child(even) {
    background-color: #020617; /* Alternierende Zeilenfarbe für bessere Lesbarkeit */
}

/* ============================================================================
   NEUE STYLES FÜR PROGRESS BARS (ZU styles.css HINZUFÜGEN)
   ============================================================================ */
.hits-cell {
    display: flex;
    align-items: center;
    gap: 8px;
}

.progress-container {
    background: #1f2933;
    border-radius: 4px;
    height: 8px;
    width: 80px; /* Feste Breite für die Visualisierung */
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: #4ade80; /* Grüne Farbe für Aktivität */
    transition: width 0.3s ease;
}

/* Anpassung für URLs, um Platz zu sparen */
#urlsTable .progress-container {
    width: 60px; 
}

/* ============================================================================
   NEUE STYLES FÜR WIDGETS (ZU styles.css HINZUFÜGEN)
   ============================================================================ */

/* Widget Grid für Top Bots und Top URLs */
.widgets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr)); /* Zwei Spalten */
    gap: 20px;
    margin-bottom: 42px;
}

.widget-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.widget-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #1f2933;
    font-size: 0.95rem;
}

.widget-list li:last-child {
    border-bottom: none;
}

.item-left {
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 70%;
}

.item-right {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #4ade80; /* Hervorhebung der Hit-Zahlen */
    font-weight: 600;
}

/* Progress Bar Visualisierung */
.progress-container {
    background: #1f2933;
    border-radius: 4px;
    height: 8px;
    width: 60px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: #4ade80;
    transition: width 0.3s ease;
}

/* Anpassung für Links in Widgets */
.widget-list a {
    color: #93c5fd;
    text-decoration: none;
}

.widget-list a:hover {
    text-decoration: underline;
}