:root {
    --km-marine: #1A3A53;
    --km-beige: #EAE2D7;
    --km-offwhite: #FCFBF9;
    --km-text: #2c3e50;
    --km-gold: #C4A380;
    --km-red: #e74c3c;
    --km-yellow: #f1c40f;
    --km-green: #2ecc71;
}

.seo-dashboard {
    padding: 2rem;
    background-color: var(--km-offwhite);
    color: var(--km-text);
    font-family: 'Lato', sans-serif;
}

.seo-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.seo-header__title {
    font-family: 'Playfair Display', serif;
    color: var(--km-marine);
    margin: 0 0 0.5rem 0;
}

.seo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.seo-card {
    background: #ffffff;
    border: 1px solid var(--km-beige);
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.02);
}

.seo-card__title {
    font-family: 'Playfair Display', serif;
    font-size: 1.25rem;
    color: var(--km-marine);
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--km-beige);
    padding-bottom: 0.5rem;
}

/* Score Circle */
.seo-score {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.seo-score__circle {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    border: 6px solid var(--km-beige);
    margin-bottom: 1rem;
}

.seo-score__circle--green { border-color: var(--km-green); color: var(--km-green); }
.seo-score__circle--yellow { border-color: var(--km-yellow); color: var(--km-yellow); }
.seo-score__circle--red { border-color: var(--km-red); color: var(--km-red); }

.seo-score__value { font-size: 2.5rem; font-weight: bold; }
.seo-score__max { font-size: 1rem; opacity: 0.7; }

/* Issues Ampelsystem */
.seo-issue-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.seo-issue-item {
    display: flex;
    align-items: center;
    background: #ffffff;
    border-left: 5px solid var(--km-beige);
    padding: 1.25rem;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    transition: transform 0.2s ease;
}

.seo-issue-item:hover {
    transform: translateX(4px);
}

.seo-issue-item--red { border-left-color: var(--km-red); }
.seo-issue-item--yellow { border-left-color: var(--km-yellow); }

.seo-issue-item__content {
    flex: 1;
    margin: 0 1.5rem;
}

.seo-issue-item__type {
    margin: 0 0 0.25rem 0;
    font-weight: bold;
    color: var(--km-marine);
}

.seo-issue-item__message {
    margin: 0;
    font-size: 0.9rem;
    color: #555;
}

.seo-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: bold;
    text-transform: uppercase;
}

.seo-badge--red { background: rgba(231, 76, 60, 0.1); color: var(--km-red); }
.seo-badge--yellow { background: rgba(241, 196, 15, 0.1); color: #d4ac0d; }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    font-family: 'Lato', sans-serif;
    transition: all 0.2s ease;
}

.btn--primary {
    background-color: var(--km-marine);
    color: #ffffff;
}

.btn--primary:hover { background-color: #11283a; }

.btn--secondary {
    background-color: var(--km-gold);
    color: #ffffff;
}

.btn--secondary:hover { background-color: #a88a68; }

.text-red { color: var(--km-red); font-weight: bold; }
.text-green { color: var(--km-green); font-weight: bold; }

/* Widescreen Layout */
.seo-dashboard--widescreen {
    max-width: 100%; /* Nutzt die vollen 34 Zoll */
}

.seo-score-board {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2rem;
    align-items: center;
}

.seo-score-card {
    background: #fff;
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid var(--km-beige);
    flex: 1;
    text-align: center;
}

.seo-score-card--main {
    flex: 0 0 250px;
}

.seo-score__bar {
    width: 100%;
    height: 30px;
    border-radius: 15px;
    color: white;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 1rem;
    /* Nutzt die CSS Variable für die Breite */
    width: var(--score);
    min-width: 40px;
}

.seo-three-columns {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.seo-column {
    background: #fdfdfc;
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid #eae2d7;
}

.seo-column__title {
    font-size: 1.2rem;
    color: var(--km-marine);
    border-bottom: 2px solid var(--km-gold);
    padding-bottom: 0.5rem;
    margin-bottom: 1.5rem;
}

/* Kompakte Issue Cards für die Spalten */
.seo-issue-item {
    flex-direction: column;
    align-items: stretch;
    padding: 1rem;
}

.seo-issue-item__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.seo-issue-item__content {
    margin: 0 0 1rem 0;
}

.seo-issue-item__snippet {
    background: #f8f9fa;
    border-left: 3px solid var(--km-red);
    padding: 0.5rem;
    font-family: monospace;
    font-size: 0.85rem;
    margin-top: 0.5rem;
}

.seo-issue-item__actions {
    display: flex;
    gap: 0.5rem;
}

.btn--small {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
    flex: 1;
}

/* ==========================================================================
   MOBILE WEICHE: SEO DASHBOARD
   ========================================================================== */
@media (max-width: 768px) {
    /* 1. Titel und Buttons im Header stapeln */
    .seo-header { flex-direction: column !important; align-items: flex-start !important; gap: 15px !important; }
    
    /* 2. DIE ZEITBOMBE ENTSCHÄRFEN: Keine 350px Mindestbreite mehr! */
    .seo-grid { display: flex !important; flex-direction: column !important; gap: 15px !important; }
    
    /* 3. Die drei Metrik-Spalten untereinander legen */
    .seo-three-columns { display: flex !important; flex-direction: column !important; gap: 15px !important; }
    
    /* 4. Die Widescreen-Score-Card (Punkte-Anzeige) responsive machen */
    .seo-score-board { display: flex !important; flex-direction: column !important; gap: 15px !important; }
    .seo-score-card--main { 
        flex: none !important; 
        width: 100% !important; 
        margin-bottom: 10px !important;
    }
    
    /* 5. Issues und Snippets wischbar / umbrechbar machen */
    .seo-issue-item { align-items: flex-start !important; }
    .seo-issue-item__snippet { overflow-wrap: break-word !important; word-wrap: break-word !important; overflow-x: auto !important; }
}