/* Website Audit - Full Report Styles */
.speed-test-container {
    max-width: 1100px;
    margin: 0 auto;
}

.input-bar {
    display: flex;
    gap: 1rem;
    margin-bottom: 3rem;
}

.input-bar .form-control {
    flex-grow: 1;
    font-size: 1.1rem;
    padding: 0.9rem 1.2rem;
}

.input-bar .btn {
    font-size: 1.1rem;
    padding: 0.9rem 1.5rem;
    white-space: nowrap;
}

.results-area {
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.report-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding: 1.5rem;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
}

.report-header h3 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 500;
    word-break: break-all;
}

.report-header a {
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: none;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 1.5rem;
}

.report-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.card-header h4 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-color);
}

.health-gauge {
    position: relative;
    width: 200px;
    height: 100px;
    margin: 1.5rem auto;
    overflow: hidden;
}

.health-gauge .score-svg {
    width: 200px;
    height: 200px;
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
}

.health-gauge .circle-bg, .health-gauge .circle {
    fill: none;
    stroke-width: 5;
    stroke-linecap: round;
}

.health-gauge .circle-bg {
    stroke: rgba(255, 255, 255, 0.1);
}

.health-gauge .circle {
    transition: stroke-dasharray 1s ease-out;
}

.health-gauge .score-text {
    position: absolute;
    bottom: 5px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
}

.health-gauge .score-text span {
    font-size: 2.5rem;
    font-weight: 700;
    display: block;
    line-height: 1;
}

.health-gauge .score-text small {
    font-size: 0.8rem;
    color: var(--text-color-light);
}

.thematic-reports .card-header {
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--card-border);
}

.thematic-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}

.thematic-card {
    background: rgba(255, 255, 255, 0.05);
    padding: 1.25rem;
    border-radius: 8px;
    border: 1px solid var(--card-border);
}

.thematic-card h5 {
    margin: 0 0 1rem 0;
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--text-color-light);
}

.thematic-score {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 2rem;
    font-weight: 700;
}

.score-icon-wrapper {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid;
}

.score-icon-inner {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.thematic-card .btn {
    margin-top: 1.5rem;
    width: 100%;
    font-weight: 500;
    cursor: pointer;
}

.btn-secondary {
    background: var(--card-border);
    color: var(--text-color);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
}


/* --- Detailed Report Styles --- */
.report-details {
    margin-top: 2rem;
}

.category-report {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    cursor: pointer;
    transition: background-color 0.2s;
}

.category-header:hover {
    background-color: rgba(255, 255, 255, 0.03);
}

.category-title {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    font-size: 1.2rem;
    font-weight: 600;
}

.category-header .score-circle-small {
    width: 40px;
    height: 40px;
    position: relative;
}

.score-circle-small .score-text {
    font-size: 1.2rem;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.score-circle-small .score-svg {
    stroke-width: 15;
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.category-header .toggle-icon {
    font-size: 1.5rem;
    transition: transform 0.3s;
}

.category-header.active .toggle-icon {
    transform: rotate(180deg);
}

.category-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease-out;
    border-top: 1px solid var(--card-border);
}

.category-header.active+.category-content {
    padding-top: 1rem;
}

.audit-group {
    padding: 0 1.5rem 1.5rem;
}

.audit-group h4 {
    margin: 1.5rem 0 1rem 0;
    color: var(--text-color-light);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.audit-item {
    padding: 1rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.audit-group>.audit-item:first-of-type {
    border-top: none;
    padding-top: 0;
}

.audit-item-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 500;
    cursor: pointer;
}

.audit-score-icon {
    width: 12px;
    /* Smaller icon */
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}

.audit-score-icon.pass {
    background-color: #22c55e;
}

.audit-score-icon.fail {
    background-color: #ef4444;
}

.audit-score-icon.warn {
    background-color: #f59e0b;
}

.audit-title {
    flex-grow: 1;
}

.audit-display-value {
    font-weight: 600;
    color: var(--text-color);
    margin-left: auto;
    padding-left: 1rem;
}

.audit-details {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out;
    padding-left: 2rem;
    margin-top: 0.75rem;
    font-size: 0.9rem;
    color: var(--text-color-light);
    line-height: 1.7;
}

.audit-details p {
    margin: 0.5rem 0;
}

.audit-details a {
    color: var(--primary-color);
    text-decoration: none;
}

.audit-details a:hover {
    text-decoration: underline;
}

.audit-details code {
    background-color: rgba(0, 0, 0, 0.2);
    padding: 2px 5px;
    border-radius: 4px;
}

.loading-container {
    text-align: center;
    padding: 3rem 0;
}

#error-container {
    text-align: center;
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
    padding: 1rem;
    border-radius: 8px;
}

@media (max-width: 900px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}


@media screen and (max-width:480px) {
    .input-bar {
        flex-direction: column;
        margin: 0;
    }
}