/* ==========================================================================
   UI Checker 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;
}

.hero-text p {
    margin-bottom: 1.25rem;
}

/* 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;
    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;
    overflow: hidden;
}

/* Blaues Fokus-Design für den UI Checker */
.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;
}

/* --- Lade-Spinner (Neu) --- */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.ui-spinner {
    border: 3px solid rgba(255,255,255,0.1);
    border-top-color: #3b82f6; /* Blaues Accent */
    border-radius: 50%;
    width: 24px;
    height: 24px;
    animation: spin 1s linear infinite;
    flex-shrink: 0;
}

.ui-spinner.done {
    border: none;
    animation: none;
    width: auto;
    height: auto;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* --- Progress (altes Design behalten für Multi) --- */
.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, #60a5fa, #3b82f6); /* UI Blau */
    color: #ffffff;
    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, .ux-box {
    border-radius: 12px;
    padding: 14px;
    font-size: 0.9rem;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* Blaues Branding für UI Status */
.status-box {
    background: rgba(96, 165, 250, 0.05);
    border: 1px solid rgba(96, 165, 250, 0.15);
}

/* Amber Branding für UX Hinweise */
.ux-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;
}

.ui-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);
}

.ui-selector {
    font-family: ui-monospace, monospace;
    word-break: break-all;
    color: #93c5fd; /* Light Blue */
    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 li {
    margin-bottom: 0.8rem;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
    border-left: 4px solid #fbbf24;
    font-size: 0.9rem;
}

/* --- Buttons --- */
.project-link {
    display: inline-block;
    padding: 12px 24px;
    background: linear-gradient(135deg, #60a5fa, #3b82f6);
    color: #ffffff !important;
    border-radius: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.project-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(59, 130, 246, 0.3);
}

.copy-btn {
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.06);
    color: #ffffff;
    border-radius: 12px;
    cursor: pointer;
    padding: 12px 24px;
    font-size: 0.9rem;
    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; }
}

/* --- Blaue Scrollbar für UI Checker --- */
.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(96, 165, 250, 0.3);
    border-radius: 10px;
    border: 2px solid transparent;
    background-clip: content-box;
}
.result-box-details::-webkit-scrollbar-thumb:hover {
    background: rgba(96, 165, 250, 0.5);
}
/* Firefox */
.result-box-details {
    scrollbar-width: thin;
    scrollbar-color: rgba(96, 165, 250, 0.3) rgba(255, 255, 255, 0.02);
}