/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

/* Minimal BlockLang Header */
.bl-header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    padding: 12px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.bl-header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.bl-logo a {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #333;
    font-weight: 600;
    font-size: 18px;
}

.bl-logo-icon {
    width: 24px;
    height: 24px;
    margin-right: 8px;
}

.bl-nav {
    display: flex;
    gap: 20px;
}

.bl-nav-link {
    text-decoration: none;
    color: #666;
    font-size: 14px;
    font-weight: 500;
    padding: 6px 12px;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.bl-nav-link:hover {
    color: #4f46e5;
    background: rgba(79, 70, 229, 0.1);
}

/* Hero Section */
.hero-section {
    text-align: center;
    padding: 60px 20px 40px;
    color: white;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 16px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.hero-subtitle {
    font-size: 1.2rem;
    font-weight: 400;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

/* Scanner Container */
.scanner-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px 60px;
}

.scanner-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.scanner-form {
    padding: 40px;
}

.form-group {
    margin-bottom: 24px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #374151;
    font-size: 15px;
}

.input-group {
    display: flex;
    gap: 12px;
    align-items: stretch;
}

.form-input {
    flex: 1;
    padding: 16px 20px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #fafafa;
}

.form-input:focus {
    outline: none;
    border-color: #4f46e5;
    background: white;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.scan-button {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 16px 28px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 140px;
    justify-content: center;
}

.scan-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(79, 70, 229, 0.3);
}

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

.scan-button:disabled {
    background: #9ca3af;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.recaptcha-group {
    display: flex;
    justify-content: center;
}

/* Results */
#result {
    margin: 0;
    padding: 0;
    display: none;
    border-top: 1px solid #e5e7eb;
    background: #f8fafc;
}

#result.loading,
#result.result-excellent,
#result.result-trustworthy,
#result.result-safe,
#result.result-neutral,
#result.result-risky,
#result.result-dangerous {
    display: block;
    padding: 30px 40px;
}

/* Progressive Green System: 60+ points = Green territory */
.result-excellent {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    border-left: 4px solid #059669;
    color: #065f46;
}

.result-trustworthy {
    background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
    border-left: 4px solid #16a34a;
    color: #14532d;
}

.result-safe {
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    border-left: 4px solid #22c55e;
    color: #166534;
}

.result-neutral {
    background: linear-gradient(135deg, #fefce8 0%, #fef3c7 100%);
    border-left: 4px solid #eab308;
    color: #92400e;
}

.result-risky {
    background: linear-gradient(135deg, #fed7aa 0%, #fdba74 100%);
    border-left: 4px solid #ea580c;
    color: #9a3412;
}

.result-dangerous {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    border-left: 4px solid #ef4444;
    color: #991b1b;
}

.loading {
    text-align: center;
    color: #6b7280;
    font-size: 16px;
}

/* Two-column layout for results content */
.results-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-top: 20px;
}

.results-column h4 {
    margin-bottom: 15px;
    font-size: 18px;
    font-weight: 600;
    border-bottom: 2px solid rgba(0, 0, 0, 0.1);
    padding-bottom: 8px;
}

.results-column ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.results-column li {
    padding: 8px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.results-column li:last-child {
    border-bottom: none;
}

.results-column strong {
    display: inline-block;
    min-width: 140px;
    font-weight: 600;
}

/* Mobile: Stack columns vertically */
@media (max-width: 768px) {
    .results-content {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    #result.loading,
    #result.result-excellent,
    #result.result-trustworthy,
    #result.result-safe,
    #result.result-neutral,
    #result.result-risky,
    #result.result-dangerous {
        padding: 20px 20px;
    }
}

/* Extension Promotion Section */
.promo-section {
    background: white;
    padding: 80px 20px;
}

.promo-content {
    max-width: 1000px;
    margin: 0 auto;
    text-align: center;
}

.promo-header {
    margin-bottom: 50px;
}

.promo-title {
    font-size: 2.2rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 16px;
}

.promo-subtitle {
    font-size: 1.1rem;
    color: #6b7280;
    max-width: 600px;
    margin: 0 auto;
}

/* Download Container */
.download-container {
    padding: 60px 20px;
}

.download-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    backdrop-filter: blur(10px);
    padding: 40px;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.download-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: #374151;
    margin-bottom: 30px;
}

.store-badges {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    padding: 20px 0;
}

.store-badges a {
    transition: transform 0.3s ease;
}

.store-badges a:hover {
    transform: scale(1.05);
}

.store-badges img {
    max-width: 150px;
    max-height: 50px;
    height: auto;
    object-fit: contain;
}

.extension-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 50px;
}

.extension-card {
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 16px;
    padding: 32px 24px;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.extension-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    transition: all 0.3s ease;
}

.chrome-card::before {
    background: linear-gradient(90deg, #4285f4, #34a853);
}

.firefox-card::before {
    background: linear-gradient(90deg, #ff9500, #ff6611);
}

.safari-card::before {
    background: linear-gradient(90deg, #00d4ff, #0066cc);
}

.extension-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.1);
    border-color: transparent;
}

.extension-icon {
    width: 60px;
    height: 60px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.browser-icon {
    width: 50px;
    height: 50px;
    object-fit: contain;
}

.store-badge {
    max-width: 180px;
    height: auto;
    object-fit: contain;
}

.extension-info h3 {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: #1f2937;
}

.extension-info p {
    color: #6b7280;
    margin-bottom: 16px;
    font-size: 15px;
}

.install-text {
    color: #4f46e5;
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 8px;
}

.how-to-use-link {
    display: block;
    color: #6b7280;
    font-size: 12px;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.how-to-use-link:hover {
    color: #4f46e5;
    text-decoration: underline;
}

.promo-features {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
}

.feature {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #6b7280;
    font-size: 15px;
    font-weight: 500;
}

.feature-icon {
    font-size: 20px;
    font-weight: bold;
}

/* Footer */
.bl-footer {
    background: #1f2937;
    color: #9ca3af;
    padding: 30px 0;
    text-align: center;
}

.bl-footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-links {
    display: flex;
    gap: 24px;
}

.footer-links a {
    color: #9ca3af;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: #d1d5db;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .input-group {
        flex-direction: column;
    }
    
    .scanner-form {
        padding: 30px 20px;
    }
    
    .bl-header-content {
        flex-direction: column;
        gap: 12px;
    }
    
    .bl-nav {
        gap: 12px;
    }
    
    .promo-features {
        gap: 20px;
    }
    
    .bl-footer-content {
        flex-direction: column;
        text-align: center;
    }
    
    .extension-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .hero-section {
        padding: 40px 20px 30px;
    }
    
    .promo-title {
        font-size: 1.8rem;
    }
    
    .extension-card {
        padding: 24px 20px;
    }
}

/* Report Feedback Section */
.feedback-section {
    margin-top: 30px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
}

.feedback-toggle {
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #dee2e6;
}

.feedback-text {
    margin: 0;
    font-size: 16px;
    color: #6c757d;
    font-weight: 400;
}

.report-link {
    display: inline-block;
    background: #6c757d;
    color: white;
    text-decoration: none;
    font-weight: 500;
    padding: 10px 20px;
    border-radius: 6px;
    transition: all 0.2s ease;
    font-size: 14px;
    border: none;
    cursor: pointer;
}

.report-link:hover {
    background: #5a6268;
    text-decoration: none;
    color: white;
    box-shadow: 0 2px 4px rgba(108, 117, 125, 0.2);
}

.report-link.active {
    background: #dc3545;
}

.report-link.active:hover {
    background: #c82333;
}

/* Toast Notifications */
.toast {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%) translateY(-100%);
    z-index: 9999;
    padding: 16px 24px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    font-size: 14px;
    font-weight: 500;
    max-width: 500px;
    opacity: 0;
    transition: all 0.3s ease;
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.toast-success {
    background: #d1fae5;
    color: #065f46;
    border-left: 4px solid #10b981;
}

.toast-error {
    background: #fee2e2;
    color: #991b1b;
    border-left: 4px solid #ef4444;
}

/* Mobile responsive toast */
@media (max-width: 768px) {
    .toast {
        max-width: 90vw;
        left: 50%;
        transform: translateX(-50%) translateY(-100%);
    }
    
    .toast.show {
        transform: translateX(-50%) translateY(0);
    }
}

/* Hide reCAPTCHA in development mode */
body[data-local="true"] .recaptcha-group,
body[data-local="dev"] .recaptcha-group {
    display: none;
}

/* Inline Report Form Styles */
.inline-report-form {
    padding: 25px;
    background: white;
    border-top: 1px solid #dee2e6;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
        padding-top: 0;
        padding-bottom: 0;
    }
    to {
        opacity: 1;
        max-height: 500px;
        padding-top: 25px;
        padding-bottom: 25px;
    }
}

.form-header {
    margin-bottom: 20px;
}

.form-header h4 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 18px;
    font-weight: 600;
}

.form-header p {
    margin: 0;
    color: #6c757d;
    font-size: 14px;
}

.feedback-options {
    margin: 20px 0;
}

.radio-option {
    display: block;
    margin-bottom: 15px;
    cursor: pointer;
    font-size: 14px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 6px;
    transition: background-color 0.2s ease;
}

.radio-option:hover {
    background: #e9ecef;
}

.radio-option input[type="radio"] {
    margin-right: 12px;
}

.radio-option span {
    color: #495057;
}

.form-row {
    display: grid;
    gap: 20px;
    margin: 20px 0;
}

.form-group {
    margin: 15px 0;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
    font-size: 14px;
}

.form-group input[type="email"] {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-family: inherit;
    font-size: 14px;
    box-sizing: border-box;
}

.form-group input[type="email"]:focus {
    outline: none;
    border-color: #4f46e5;
    box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.1);
}

.form-group small {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    color: #6c757d;
    font-style: italic;
}

.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-family: inherit;
    font-size: 14px;
    resize: vertical;
    box-sizing: border-box;
    min-height: 80px;
}

.form-group textarea:focus {
    outline: none;
    border-color: #4f46e5;
    box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.1);
}

.form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #dee2e6;
}

.btn-primary {
    background: #007bff;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.2s ease;
}

.btn-primary:hover {
    background: #0056b3;
}

.btn-secondary {
    background: #6c757d;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.2s ease;
}

.btn-secondary:hover {
    background: #545b62;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .feedback-toggle {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .inline-report-form {
        padding: 20px;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .btn-primary, .btn-secondary {
        width: 100%;
        padding: 14px;
    }
}