* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Summary Card Styles */
.summary-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    color: white;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.summary-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    text-align: center;
}

.summary-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.stat-item {
    text-align: center;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    backdrop-filter: blur(10px);
}

.stat-number {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.875rem;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-item.valid .stat-number {
    color: #10b981;
}

.stat-item.expiring .stat-number {
    color: #f59e0b;
}

.stat-item.expired .stat-number {
    color: #ef4444;
}

/* Status Section Styles */
.status-section {
    margin-bottom: 2rem;
}

.section-header {
    margin-bottom: 1rem;
}

.section-title {
    font-size: 1.125rem;
    font-weight: 600;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    display: inline-block;
    margin-bottom: 1rem;
}

.section-title.valid {
    background-color: #dcfce7;
    color: #166534;
    border-left: 4px solid #10b981;
}

.section-title.expiring {
    background-color: #fef3c7;
    color: #92400e;
    border-left: 4px solid #f59e0b;
}

.section-title.expired {
    background-color: #fee2e2;
    color: #991b1b;
    border-left: 4px solid #ef4444;
}

/* Enhanced Certificate Card Styles for Grouping */
.valid-section .certificate-card {
    border-left: 4px solid #10b981;
    background: linear-gradient(to right, #f0fdf4, #ffffff);
}

.expiring-section .certificate-card {
    border-left: 4px solid #f59e0b;
    background: linear-gradient(to right, #fffbeb, #ffffff);
}

.expired-section .certificate-card {
    border-left: 4px solid #ef4444;
    background: linear-gradient(to right, #fef2f2, #ffffff);
    opacity: 0.9;
}

.expired-section .certificate-card .certificate-title {
    color: #6b7280;
}

.expired-section .certificate-card .info-value {
    color: #6b7280;
}

/* Responsive Summary Card */
@media (max-width: 768px) {
    .summary-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    
    .stat-item {
        padding: 0.5rem;
    }
    
    .stat-number {
        font-size: 1.25rem;
    }
}

@media (max-width: 480px) {
    .summary-stats {
        grid-template-columns: 1fr;
    }
    
    .section-title {
        font-size: 1rem;
        padding: 0.5rem 0.75rem;
    }
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: #f5f7fa;
    min-height: 100vh;
    line-height: 1.6;
    color: #333;
}

/* Navigation */
.navbar {
    background-color: #ffffff;
    border-bottom: 1px solid #e1e5e9;
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo {
    color: #1e40af;
    display: flex;
    align-items: center;
}

.brand-text {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1e40af;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    color: #64748b;
    font-weight: 500;
    padding: 0.5rem 0;
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: #1e40af;
    border-bottom-color: #1e40af;
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 3rem 2rem;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: calc(100vh - 140px);
}

.content-container {
    max-width: 600px;
    width: 100%;
}

.verification-card {
    background: white;
    border-radius: 12px;
    padding: 3rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    border: 1px solid #e1e5e9;
    text-align: center;
    margin-bottom: 2rem;
}

.main-title {
    font-size: 2rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 1rem;
}

.subtitle {
    color: #6b7280;
    font-size: 1rem;
    margin-bottom: 2.5rem;
    line-height: 1.6;
}

.verification-form {
    text-align: left;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.input-wrapper {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    z-index: 1;
}

.form-input {
    width: 100%;
    padding: 0.875rem 1rem 0.875rem 2.75rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.2s ease;
    background-color: #ffffff;
}

.form-input:focus {
    outline: none;
    border-color: #1e40af;
    box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.1);
}

.form-input::placeholder {
    color: #9ca3af;
}

.check-button {
    width: 100%;
    background-color: #1e40af;
    color: white;
    border: none;
    padding: 0.875rem 1.5rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 0.5rem;
}

.check-button:hover {
    background-color: #1d4ed8;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(30, 64, 175, 0.3);
}

.check-button:active {
    transform: translateY(0);
}

/* Results Section */
.results-section {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    border: 1px solid #e1e5e9;
    margin-bottom: 2rem;
}

.results-title {
    color: #059669;
    margin-bottom: 1.5rem;
    font-size: 1.25rem;
    font-weight: 600;
}

.certificate-list {
    space-y: 1rem;
}

.certificate-card {
    background: white;
    border-radius: 6px;
    padding: 1rem;
    margin-bottom: 1rem;
    border: 1px solid #e5e7eb;
}

.certificate-card:last-child {
    margin-bottom: 0;
}

.certificate-header {
    margin-bottom: 1rem;
}

.certificate-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1f2937;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.security-icon {
    color: #059669;
    flex-shrink: 0;
}

.certificate-info-simple {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.info-label {
    font-size: 0.75rem;
    color: #9ca3af;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.info-value {
    font-weight: 400;
    color: #374151;
    font-size: 0.875rem;
}

.certificate-status {
    display: inline-block;
    padding: 0.375rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
}

/* Certificate Countdown Styles */
.certificate-countdown {
    background: #f8fafc;
    border-radius: 8px;
    padding: 1rem;
    margin: 1rem 0;
    text-align: center;
    border: 2px solid #e2e8f0;
}

.countdown-text {
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.countdown-days {
    font-size: 1.25rem;
    font-weight: 700;
}

.countdown-valid {
    background: #f0fdf4;
    border-color: #22c55e;
}

.countdown-valid .countdown-text {
    color: #15803d;
}

.countdown-valid .countdown-days {
    color: #16a34a;
}

.countdown-expiring {
    background: #fffbeb;
    border-color: #f59e0b;
}

.countdown-expiring .countdown-text {
    color: #d97706;
}

.countdown-expiring .countdown-days {
    color: #f59e0b;
}

.countdown-expired {
    background: #fef2f2;
    border-color: #ef4444;
}

.countdown-expired .countdown-text {
    color: #dc2626;
}

.countdown-expired .countdown-days {
    color: #ef4444;
}

.status-valid {
    background-color: #d1fae5;
    color: #065f46;
}

.status-expired {
    background-color: #fee2e2;
    color: #991b1b;
}

.status-expiring {
    background-color: #fef3c7;
    color: #92400e;
}

/* Error Section */
.error-section {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    border: 1px solid #e1e5e9;
    text-align: center;
}

.error-content {
    max-width: 400px;
    margin: 0 auto;
}

.error-title {
    color: #dc2626;
    margin-bottom: 0.5rem;
    font-size: 1.25rem;
    font-weight: 600;
}

.error-text {
    color: #6b7280;
    font-size: 1rem;
    line-height: 1.6;
}

/* Footer */
.footer {
    background-color: #374151;
    color: #d1d5db;
    text-align: center;
    padding: 2rem;
    margin-top: auto;
}

.footer-content p {
    margin: 0;
    font-size: 0.875rem;
}

.footer-subtitle {
    opacity: 0.8;
    margin-top: 0.25rem !important;
}

/* Loading State */
.loading {
    text-align: center;
    padding: 2rem;
    color: #6b7280;
    font-size: 1rem;
}

.loading::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #e5e7eb;
    border-top: 2px solid #1e40af;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 0.5rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-container {
        padding: 1rem;
    }
    
    .nav-links {
        gap: 1rem;
    }
    
    .brand-text {
        font-size: 1rem;
    }
    
    .main-content {
        padding: 2rem 1rem;
    }
    
    .verification-card {
        padding: 2rem 1.5rem;
    }
    
    .main-title {
        font-size: 1.75rem;
    }
    
    .certificate-info-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .certificate-info {
        grid-template-columns: 1fr;
    }
    
    .nav-links {
        display: none;
    }
}

@media (max-width: 480px) {
    .verification-card {
        padding: 1.5rem 1rem;
    }
    
    .main-title {
        font-size: 1.5rem;
    }
    
    .nav-container {
        padding: 0.75rem;
    }
}
/* Source-based theming */
.source-edurating .section-header h4 {
    color: #d97706; /* orange-600 */
}
.source-educor .section-header h4 {
    color: #1e40af; /* blue-800 */
}

/* Apply accents when card carries source class itself */
.certificate-card.source-edurating {
    border-left: 4px solid #f59e0b; /* orange-500 */
    background: linear-gradient(to right, #fff7ed, #ffffff); /* orange-50 */
}
.certificate-card.source-educor {
    border-left: 4px solid #1e40af; /* blue-800 */
    background: linear-gradient(to right, #eff6ff, #ffffff); /* blue-50 */
}

/* Apply accents when card is inside a section with source class */
.source-edurating .certificate-card {
    border-left: 4px solid #f59e0b; /* orange-500 */
    background: linear-gradient(to right, #fff7ed, #ffffff); /* orange-50 */
}
.source-educor .certificate-card {
    border-left: 4px solid #1e40af; /* blue-800 */
    background: linear-gradient(to right, #eff6ff, #ffffff); /* blue-50 */
}

/* Source badge */
.source-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.5rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 600;
    border: 1px solid transparent;
}

.source-edurating .source-badge,
.certificate-card.source-edurating .source-badge {
    background-color: #fff7ed; /* orange-50 */
    color: #d97706; /* orange-600 */
    border-color: #f59e0b; /* orange-500 */
}

.source-educor .source-badge,
.certificate-card.source-educor .source-badge {
    background-color: #eff6ff; /* blue-50 */
    color: #1e3a8a; /* blue-900 */
    border-color: #1e40af; /* blue-800 */
}

.source-unknown .source-badge,
.certificate-card.source-unknown .source-badge {
    background-color: #f3f4f6; /* gray-100 */
    color: #374151; /* gray-700 */
    border-color: #9ca3af; /* gray-400 */
}

/* Global banner for entry restriction */
.global-banner {
    border: 1px solid #fecaca;
    background-color: #fef2f2;
    color: #7f1d1d;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 16px;
}
.global-banner .title {
    font-weight: 800;
    font-size: 18px;
    margin-bottom: 6px;
}
.global-banner .desc {
    font-size: 14px;
    line-height: 1.6;
}

/* Banned card and corner ribbon */
.certificate-card.banned-card {
    position: relative;
    overflow: visible;
}
.ribbon-banned {
    position: absolute;
    top: 0;
    left: 0;
    width: 110px;
    height: 110px;
    overflow: hidden;
    pointer-events: none;
}
.ribbon-banned .ribbon-text {
    position: absolute;
    display: block;
    width: 160px;
    padding: 8px 0;
    background: #dc2626; /* red-600 */
    color: #ffffff;
    text-align: center;
    font-weight: 800;
    text-transform: uppercase;
    box-shadow: 0 3px 10px rgba(0,0,0,.25);
    transform: rotate(-45deg);
    top: 18px;
    left: -38px;
    letter-spacing: 0.5px;
}

/* Ensure spacing utilities work even without Tailwind */
.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }