/* ===== LLM AUDIT TOOL STYLES ===== */

/* Audit Tool Form */
.llm-audit-tool {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(248, 250, 252, 0.95));
    border: 2px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 2.5rem;
    margin: 2.5rem 0;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
    backdrop-filter: blur(10px);
}

.audit-tool__header {
    margin-bottom: 2rem;
}

.audit-tool__badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(14, 165, 233, 0.1));
    color: var(--primary-color);
    font-size: 0.875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
}

.audit-tool__title {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0 0 0.5rem 0;
}

.audit-tool__subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin: 0;
}

.audit-tool__input-group {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.audit-tool__input {
    flex: 1;
    padding: 1.125rem 1.5rem;
    font-size: 1.0625rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    background: var(--bg-color);
    color: var(--text-primary);
    transition: var(--transition);
    font-family: var(--font-body);
}

.audit-tool__input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.audit-tool__input::placeholder {
    color: var(--text-light);
}

.audit-tool__button {
    flex-shrink: 0;
    white-space: nowrap;
}

.audit-tool__note {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9375rem;
    color: var(--text-secondary);
}

.audit-tool__note svg {
    flex-shrink: 0;
    color: var(--success-color);
}

.audit-tool__checks {
    display: flex;
    gap: 0.75rem;
    margin-top: 2rem;
    flex-wrap: wrap;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.check-item {
    background: var(--bg-secondary);
    color: var(--text-secondary);
    font-size: 0.8125rem;
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

/* ===== AUDIT RESULTS SECTION ===== */
.audit-results {
    background: linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg-color) 100%);
    min-height: 100vh;
}

.audit-results__header {
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
}

.back-to-audit {
    position: absolute;
    left: 0;
    top: 0;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    font-weight: 600;
    color: var(--text-primary);
    transition: var(--transition);
    cursor: pointer;
    font-family: var(--font-body);
    font-size: 0.9375rem;
}

.back-to-audit:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateX(-3px);
}

.audit-results__title {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.audit-results__url {
    font-size: 1.125rem;
    color: var(--primary-color);
    font-weight: 600;
}

/* Score Card */
.audit-results__score-card {
    display: flex;
    justify-content: center;
    margin-bottom: 4rem;
}

.score-card {
    background: var(--bg-card);
    padding: 3rem;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    text-align: center;
    border: 2px solid var(--border-color);
}

.score-circle {
    position: relative;
    width: 180px;
    height: 180px;
    margin: 0 auto 2rem;
}

.score-circle svg {
    width: 100%;
    height: 100%;
}

.score-value {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: baseline;
    gap: 0.25rem;
}

#overall-score {
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1;
}

.score-label {
    font-size: 1.75rem;
    color: var(--text-light);
    font-weight: 600;
}

.score-card h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.score-status {
    font-size: 1.125rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Check Results */
.audit-results__checks {
    display: grid;
    gap: 1.5rem;
    margin-bottom: 4rem;
}

.check-result {
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-xl);
    overflow: hidden;
    transition: var(--transition);
}

.check-result:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.check-result__header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.75rem;
    cursor: pointer;
}

.check-result__icon {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
}

.check-result.pass .check-result__icon {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success-color);
}

.check-result.pass .check-result__icon::before {
    content: '✓';
}

.check-result.fail .check-result__icon {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger-color);
}

.check-result.fail .check-result__icon::before {
    content: '✗';
}

.check-result.warning .check-result__icon {
    background: rgba(245, 158, 11, 0.1);
    color: var(--accent-color);
}

.check-result.warning .check-result__icon::before {
    content: '!';
}

.check-result__info {
    flex: 1;
}

.check-result__info h4 {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.check-result__info p {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    margin: 0;
}

.check-result__status {
    flex-shrink: 0;
    font-size: 0.875rem;
    font-weight: 700;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.check-result.pass .check-result__status {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success-color);
}

.check-result.fail .check-result__status {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger-color);
}

.check-result.warning .check-result__status {
    background: rgba(245, 158, 11, 0.1);
    color: var(--accent-color);
}

.check-result__details {
    padding: 0 1.75rem 1.75rem 5.25rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

.check-result__details strong {
    color: var(--text-primary);
}

/* CTA Card */
.audit-results__cta {
    margin-top: 4rem;
}

.cta-card {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: var(--text-white);
    padding: 3rem;
    border-radius: var(--radius-xl);
    text-align: center;
    box-shadow: var(--shadow-xl);
}

.cta-card h3 {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 1rem;
}

.cta-card > p {
    font-size: 1.125rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

.cta-features {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.cta-feature {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    font-size: 0.9375rem;
    font-weight: 600;
    text-align: left;
}

.cta-feature svg {
    flex-shrink: 0;
}

.cta-note {
    font-size: 0.875rem;
    margin-top: 1.5rem;
    opacity: 0.85;
}

/* Loading Animation */
@keyframes spin {
    to { transform: rotate(360deg); }
}

.button-loading {
    pointer-events: none;
    opacity: 0.7;
}

.button-loading svg {
    animation: spin 1s linear infinite;
}

/* ===== RESPONSIVE - AUDIT TOOL ===== */
@media screen and (max-width: 768px) {
    .llm-audit-tool {
        padding: 2rem 1.5rem;
    }
    
    .audit-tool__title {
        font-size: 1.5rem;
    }
    
    .audit-tool__subtitle {
        font-size: 1rem;
    }
    
    .audit-tool__input-group {
        flex-direction: column;
    }
    
    .audit-tool__button {
        width: 100%;
    }
    
    .audit-tool__checks {
        gap: 0.5rem;
    }
    
    .check-item {
        font-size: 0.75rem;
        padding: 0.4rem 0.75rem;
    }
    
    .back-to-audit {
        position: static;
        margin-bottom: 2rem;
        width: 100%;
        justify-content: center;
    }
    
    .audit-results__title {
        font-size: 1.75rem;
    }
    
    .audit-results__url {
        font-size: 1rem;
        word-break: break-all;
    }
    
    .score-card {
        padding: 2rem 1.5rem;
    }
    
    .score-circle {
        width: 150px;
        height: 150px;
    }
    
    #overall-score {
        font-size: 2.5rem;
    }
    
    .score-label {
        font-size: 1.25rem;
    }
    
    .check-result__header {
        padding: 1.25rem;
        gap: 1rem;
    }
    
    .check-result__icon {
        width: 40px;
        height: 40px;
    }
    
    .check-result__info h4 {
        font-size: 1rem;
    }
    
    .check-result__info p {
        font-size: 0.875rem;
    }
    
    .check-result__details {
        padding: 0 1.25rem 1.25rem 4.25rem;
        font-size: 0.875rem;
    }
    
    .cta-card {
        padding: 2rem 1.5rem;
    }
    
    .cta-card h3 {
        font-size: 1.5rem;
    }
    
    .cta-features {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
}

@media screen and (max-width: 480px) {
    .audit-tool__title {
        font-size: 1.25rem;
    }
    
    #overall-score {
        font-size: 2rem;
    }
    
    .check-result__details {
        padding-left: 1.25rem;
    }
}



/* Audit Tool Options */
.audit-tool__options {
    margin: 1rem 0;
    display: flex;
    justify-content: center;
}

.audit-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text-light);
}

.audit-option__checkbox {
    display: none;
}

.audit-option__checkmark {
    width: 18px;
    height: 18px;
    border: 2px solid var(--border-color);
    border-radius: 4px;
    position: relative;
    transition: all 0.3s ease;
}

.audit-option__checkbox:checked + .audit-option__checkmark {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.audit-option__checkbox:checked + .audit-option__checkmark::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 2px;
    width: 4px;
    height: 8px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}


/* Pages Breakdown */
.pages-breakdown {
    margin: 2rem 0;
    padding: 1.5rem;
    background: var(--bg-light);
    border-radius: var(--radius-lg);
}

.pages-breakdown h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.pages-list {
    display: grid;
    gap: 0.75rem;
    max-height: 300px;
    overflow-y: auto;
}

.page-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: white;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.page-url {
    font-size: 0.9rem;
    color: var(--text-primary);
    flex: 1;
    margin-right: 1rem;
    word-break: break-all;
}

.page-score {
    font-size: 0.875rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    min-width: 50px;
    text-align: center;
}

.page-score.score-good {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
}

.page-score.score-warn {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
}

.page-score.score-poor {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}


/* Notification Styles */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    max-width: 400px;
    border-radius: var(--radius-md);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    animation: slideIn 0.3s ease-out;
}

.notification--info {
    background: #3b82f6;
    color: white;
}

.notification--warning {
    background: #f59e0b;
    color: white;
}

.notification--error {
    background: #ef4444;
    color: white;
}

.notification--success {
    background: #22c55e;
    color: white;
}

.notification__content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
}

.notification__message {
    flex: 1;
    margin-right: 1rem;
    font-size: 0.9rem;
}

.notification__close {
    background: none;
    border: none;
    color: inherit;
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s ease;
}

.notification__close:hover {
    background: rgba(255, 255, 255, 0.2);
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@media (max-width: 768px) {
    .notification {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }
}


/* Missing Items and Recommendations */
.missing-items,
.recommendations {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: var(--radius-md);
}

.missing-items {
    background: rgba(239, 68, 68, 0.1);
    border-left: 4px solid #ef4444;
}

.recommendations {
    background: rgba(59, 130, 246, 0.1);
    border-left: 4px solid #3b82f6;
}

.missing-items p,
.recommendations p {
    margin: 0 0 0.5rem 0;
    font-weight: 600;
    color: var(--text-primary);
}

.missing-items ul,
.recommendations ul {
    margin: 0;
    padding-left: 1.5rem;
}

.missing-items li,
.recommendations li {
    margin: 0.25rem 0;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.missing-items li {
    color: #dc2626;
}

.recommendations li {
    color: #1d4ed8;
}


/* Missing Pages Display */
.missing-pages {
    margin-top: 1rem;
    padding: 1rem;
    background: rgba(245, 158, 11, 0.1);
    border-left: 4px solid #f59e0b;
    border-radius: var(--radius-md);
}

.missing-pages p {
    margin: 0 0 0.5rem 0;
    font-weight: 600;
    color: var(--text-primary);
}

.missing-pages ul {
    margin: 0;
    padding-left: 1.5rem;
    max-height: 200px;
    overflow-y: auto;
}

.missing-pages li {
    margin: 0.25rem 0;
    font-size: 0.85rem;
}

.missing-pages a {
    color: #1d4ed8;
    text-decoration: none;
    word-break: break-all;
}

.missing-pages a:hover {
    text-decoration: underline;
}

.missing-pages em {
    color: var(--text-light);
    font-style: italic;
}


/* Found Schemas Display */
.found-schemas {
    margin-top: 1rem;
    padding: 1rem;
    background: rgba(34, 197, 94, 0.1);
    border-left: 4px solid #22c55e;
    border-radius: var(--radius-md);
}

.found-schemas p {
    margin: 0 0 0.5rem 0;
    font-weight: 600;
    color: var(--text-primary);
}

.found-schemas ul {
    margin: 0;
    padding-left: 1.5rem;
}

.found-schemas li {
    margin: 0.25rem 0;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.found-schemas strong {
    color: #16a34a;
}


/* Schema Explanations */
.schema-description {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-style: italic;
}

.schema-what-to-add {
    color: #1d4ed8;
    font-size: 0.85rem;
    margin-top: 0.25rem;
    display: block;
}

.missing-items li {
    margin: 0.75rem 0;
    padding: 0.5rem;
    background: rgba(239, 68, 68, 0.05);
    border-radius: var(--radius-sm);
}

.missing-items li strong {
    color: #dc2626;
    font-size: 1rem;
}

.missing-items li br {
    margin: 0.25rem 0;
}


/* File Generator */
.file-generator {
    margin-top: 1rem;
    padding: 1rem;
    background: rgba(59, 130, 246, 0.1);
    border-left: 4px solid #3b82f6;
    border-radius: var(--radius-md);
}

.file-generator p {
    margin: 0 0 0.5rem 0;
    color: var(--text-primary);
}

.file-generator p:first-child {
    font-weight: 600;
}

.file-generator p:last-of-type {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.generate-file-btn {
    background: #3b82f6;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 0.5rem;
}

.generate-file-btn:hover {
    background: #2563eb;
    transform: translateY(-1px);
}

.generate-file-btn:active {
    transform: translateY(0);
}
