/* ==========================================================================
   Linkchecker Specific Styles - Final UX & Visual Fix
   ========================================================================== */

/* Basis-Layout Schutz & Scroll-Stabilisierung */
html, body {
    height: 100%;
    overflow-x: hidden;
    width: 100%;
    margin: 0;
    scroll-behavior: smooth;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1 0 auto;
    padding-bottom: 4rem;
    width: 100%;
    position: relative;
}

/* --- Hero Sektion Anpassung (Kompakter Look) --- */
.hero.section {
    padding-bottom: 1.5rem !important; /* Reduziert den Abstand unter dem Text */
}

.hero-text p {
    margin-bottom: 1.25rem; /* Weniger Platz unter der Beschreibung */
}

/* Tool Shell & Grid Fix */
.tool-shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 2rem;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 auto;
    margin-top: -0.5rem !important; /* Zieht die Card näher an den Hero-Text */
    position: relative;
    z-index: 10;
}

.tool-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 28px;
    padding: 28px;
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.22);
    width: 100% !important;
    box-sizing: border-box !important;
    position: relative;
    display: flex;
    flex-direction: column;
    height: auto !important;
}

/* --- Controls & Inputs --- */
.tool-label {
    display: block;
    margin-bottom: 0.6rem;
    font-weight: 600;
    color: #f8fafc;
}

.tool-input, .tool-textarea {
    width: 100% !important;
    border: 1px solid rgba(255, 255, 255, 0.10);
    background: rgba(255, 255, 255, 0.04);
    color: #ffffff;
    border-radius: 16px;
    padding: 14px 16px;
    font-size: 1rem;
    outline: none;
    box-sizing: border-box !important;
    transition: all 0.25s ease;
    margin-bottom: 1.25rem; /* Abstand zu den Buttons */
    overflow: hidden; /* Für das Auto-Resize Skript */
}

.tool-input:focus, .tool-textarea:focus {
    border-color: rgba(52, 211, 153, 0.4);
    background: rgba(255, 255, 255, 0.06);
}

.tool-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

/* --- Progress --- */
.progress-container {
    margin-top: 0.5rem;
    width: 100%;
    height: 20px;
    border-radius: 999px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.progress-bar {
    height: 100%;
    width: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #34d399, #10b981);
    color: #03100b;
    font-size: 0.85rem;
    font-weight: 700;
    transition: width 0.25s ease;
}

/* --- Analyse-Layout (Zwei Boxen System) --- */
.analysis-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
    margin-top: 1rem;
}

.status-box, .a11y-box {
    border-radius: 12px;
    padding: 14px;
    font-size: 0.9rem;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.status-box {
    background: rgba(16, 185, 129, 0.05);
    border: 1px solid rgba(16, 185, 129, 0.15);
}

.a11y-box {
    background: rgba(251, 191, 36, 0.05);
    border: 1px solid rgba(251, 191, 36, 0.15);
}

.box-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: rgba(255, 255, 255, 0.4);
    font-weight: 700;
}

/* --- Ergebnis-Container & Scroll-Fix --- */
.result-details {
    margin-top: 1.5rem;
}

.result-details-summary {
    cursor: pointer;
    padding: 14px 18px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #f8fafc;
    font-weight: 600;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.2s ease;
}

.result-details-summary:hover {
    background: rgba(255, 255, 255, 0.1);
}

.result-box-details {
    margin-top: 1rem;
    max-height: 550px;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    padding: 15px;
    background: rgba(0, 0, 0, 0.25) !important;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    width: 100% !important;
    box-sizing: border-box !important;
    overscroll-behavior: contain;
}

.url-entry {
    margin-bottom: 1.5rem;
    padding: 1.25rem;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.url-text {
    font-family: ui-monospace, monospace;
    word-break: break-all;
    color: #8af0c5;
    font-size: 0.85rem;
    line-height: 1.4;
}

/* --- Zusammenfassung --- */
.summary-box {
    margin-top: 1.25rem;
    padding: 18px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.07);
}

#errorSummary ul {
    list-style: none;
    padding-left: 0;
}

#errorSummary li {
    margin-bottom: 0.8rem;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
    border-left: 4px solid #f87171;
    font-size: 0.9rem;
}

/* --- Buttons --- */
.copy-btn {
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.06);
    color: #ffffff;
    border-radius: 10px;
    cursor: pointer;
    padding: 6px 12px;
    font-size: 0.8rem;
    transition: all 0.2s ease;
}

.copy-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    transform: translateY(-1px);
}

/* --- Responsive --- */
@media (max-width: 900px) {
    .analysis-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .tool-card { padding: 18px !important; }
    .result-box-details { max-height: 400px; }
    .hero.section { padding-top: 2rem !important; }
}

/* --- Einheitliche Grüne Scrollbar --- */
.result-box-details::-webkit-scrollbar {
    width: 8px;
}
.result-box-details::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 10px;
}
.result-box-details::-webkit-scrollbar-thumb {
    background: rgba(52, 211, 153, 0.3);
    border-radius: 10px;
    border: 2px solid transparent;
    background-clip: content-box;
}
.result-box-details::-webkit-scrollbar-thumb:hover {
    background: rgba(52, 211, 153, 0.5);
}
/* Firefox */
.result-box-details {
    scrollbar-width: thin;
    scrollbar-color: rgba(52, 211, 153, 0.3) rgba(255, 255, 255, 0.02);
}