/* Audit Page Specific Styles */

/* Hero Section */
.audit-hero {
    background: linear-gradient(135deg, #0f1621 0%, #1a2332 100%);
    padding: 220px 0 80px;
    color: white;
    position: relative;
    overflow: hidden;
    text-align: center;
}

.audit-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 50% 50%, rgba(0, 113, 235, 0.15) 0%, transparent 60%);
    animation: pulse 4s ease-in-out infinite;
}

.audit-hero h1 {
    font-size: 48px;
    margin-bottom: 20px;
    color: #00D4FF;
    text-shadow: 0 0 20px rgba(0, 212, 255, 0.3);
}

.audit-hero p {
    font-size: 20px;
    max-width: 800px;
    margin: 0 auto 40px;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.6;
}

/* Form Container */
.audit-container {
    max-width: 800px;
    margin: -60px auto 80px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
    padding: 40px;
    position: relative;
    z-index: 10;
    transition: all 0.5s ease;
    color: #1a2332;
    /* Ensure default text is dark */
}

.audit-container h1,
.audit-container h2,
.audit-container h3,
.audit-container h4 {
    color: #1a2332 !important;
    /* Force dark headings */
}

/* Steps */
.step-content {
    display: none;
    animation: fadeIn 0.5s ease;
}

.step-content.active {
    display: block;
}

/* Step 1: Form */
.form-group {
    margin-bottom: 20px;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #1a2332;
}

.form-control {
    width: 100%;
    padding: 15px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 16px;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: #0071EB;
    outline: none;
    box-shadow: 0 0 0 4px rgba(0, 113, 235, 0.1);
}

.audit-btn {
    width: 100%;
    padding: 18px;
    background: linear-gradient(135deg, #0071EB, #005bb5);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.audit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 113, 235, 0.3);
}

/* Step 2: Loading Animation */
.scanning-animation {
    text-align: center;
    padding: 40px 20px;
}

.scanner-icon {
    font-size: 60px;
    color: #00D4FF;
    margin-bottom: 30px;
    animation: spin 2s linear infinite;
}

.scan-progress-bar {
    width: 100%;
    height: 10px;
    background: #e5e7eb;
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 20px;
}

.scan-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #0071EB, #00D4FF);
    width: 0%;
    transition: width 0.3s ease;
}

.scan-text {
    font-size: 18px;
    font-weight: 600;
    color: #1a2332;
    min-height: 27px;
}

.scan-log {
    margin-top: 20px;
    font-size: 14px;
    color: #6b7280;
    font-family: monospace;
    height: 100px;
    overflow: hidden;
    background: #f8f9fa;
    padding: 10px;
    border-radius: 5px;
    text-align: left;
}

.log-item {
    margin-bottom: 5px;
    opacity: 0;
    animation: slideUpFade 0.3s forwards;
}

.log-item.success {
    color: #059669;
}

.log-item.warning {
    color: #d97706;
}

.log-item.error {
    color: #dc2626;
}

/* Step 3: Results */
.results-header {
    text-align: center;
    margin-bottom: 40px;
    border-bottom: 2px solid #f3f4f6;
    padding-bottom: 20px;
}

.overall-grade-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 120px;
    height: 120px;
    background: #fef2f2;
    /* Default redish */
    color: #dc2626;
    border: 4px solid #dc2626;
    border-radius: 50%;
    font-size: 48px;
    font-weight: 800;
    margin-bottom: 15px;
    box-shadow: 0 10px 30px rgba(220, 38, 38, 0.2);
}

/* Dynamic Grade Colors */
.grade-A {
    background: #ecfdf5;
    color: #059669;
    border-color: #059669;
    box-shadow: 0 10px 30px rgba(5, 150, 105, 0.2);
}

.grade-B {
    background: #eff6ff;
    color: #2563eb;
    border-color: #2563eb;
    box-shadow: 0 10px 30px rgba(37, 99, 235, 0.2);
}

.grade-C {
    background: #fffbeb;
    color: #d97706;
    border-color: #d97706;
    box-shadow: 0 10px 30px rgba(217, 119, 6, 0.2);
}

.grade-D {
    background: #fff1f2;
    color: #e11d48;
    border-color: #e11d48;
    box-shadow: 0 10px 30px rgba(225, 29, 72, 0.2);
}

.grade-F {
    background: #fef2f2;
    color: #dc2626;
    border-color: #dc2626;
    box-shadow: 0 10px 30px rgba(220, 38, 38, 0.2);
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.metric-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 15px;
    padding: 20px;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease;
}

.metric-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
}

.metric-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.metric-title {
    font-weight: 700;
    color: #1a2332;
    display: flex;
    align-items: center;
    gap: 10px;
}

.metric-grade {
    font-size: 24px;
    font-weight: 800;
}

.metric-desc {
    font-size: 14px;
    color: #6b7280;
    line-height: 1.5;
}

/* Comparison Table */
.comparison-section {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 40px;
}

.comparison-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.comparison-table th {
    text-align: left;
    padding: 10px;
    color: #6b7280;
    font-size: 14px;
    border-bottom: 2px solid #e5e7eb;
}

.comparison-table td {
    padding: 15px 10px;
    border-bottom: 1px solid #e5e7eb;
    vertical-align: middle;
}

.comparison-table tr:last-child td {
    border-bottom: none;
}

.comp-name {
    font-weight: 600;
    color: #1a2332;
}

.comp-score {
    font-weight: 700;
    color: #059669;
}

.user-row {
    background: #fff1f2;
}

.user-row .comp-score {
    color: #dc2626;
}

/* Animations */
@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@keyframes slideUpFade {
    0% {
        opacity: 0;
        transform: translateY(10px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(-10px);
    }

    60% {
        transform: translateY(-5px);
    }
}

@media (max-width: 768px) {
    .audit-hero h1 {
        font-size: 36px;
    }

    .overall-grade-badge {
        width: 100px;
        height: 100px;
        font-size: 40px;
    }

    .metrics-grid {
        grid-template-columns: 1fr;
    }
}