/* DomainSec - Modern Security Scanner Styles */

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #fafbfc;
    min-height: 100vh;
    line-height: 1.6;
    color: #1a1d29;
    overflow-x: hidden;
}

/* Navigation Bar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    z-index: 1000;
    height: 70px;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 32px;
    height: 100%;
    display: flex;
    align-items: center;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
    font-size: 1.5rem;
    color: #1a1d29;
}

.logo-icon {
    font-size: 1.8rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo-text {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Main Content */
.main-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 100vh;
    padding-top: 70px;
}

/* Hero Section (Left) */
.hero-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    display: flex;
    align-items: center;
    padding: 60px;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="white" opacity="0.05"/><circle cx="75" cy="75" r="1" fill="white" opacity="0.05"/><circle cx="50" cy="10" r="0.5" fill="white" opacity="0.03"/><circle cx="20" cy="80" r="0.5" fill="white" opacity="0.03"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 500px;
}

.hero-title {
    font-size: 3.2rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 24px;
    letter-spacing: -0.02em;
}

.hero-subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-bottom: 40px;
    line-height: 1.6;
    font-weight: 400;
}

.features-list {
    margin-bottom: 48px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    font-size: 1rem;
    opacity: 0.95;
}

.feature-icon {
    font-size: 1.2rem;
}

/* Domain Form */
.domain-form {
    margin-bottom: 32px;
}

.form-label {
    display: block;
    margin-bottom: 12px;
    font-weight: 600;
    font-size: 1rem;
    opacity: 0.9;
}

.input-wrapper {
    display: flex;
    gap: 0;
    background: white;
    border-radius: 16px;
    padding: 4px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.domain-input {
    flex: 1;
    padding: 20px 24px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-family: inherit;
    background: transparent;
    color: #1a1d29;
    outline: none;
}

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

.scan-button {
    background: linear-gradient(135deg, #1a1d29 0%, #2d3748 100%);
    color: white;
    padding: 20px 32px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}

.scan-button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(26, 29, 41, 0.3);
}

.scan-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.button-arrow {
    transition: transform 0.3s ease;
}

.scan-button:hover .button-arrow {
    transform: translateX(4px);
}

/* Loading Spinner */
.loading-spinner {
    display: none;
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Trust Indicators */
.trust-indicators {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    opacity: 0.8;
}

.trust-item {
    font-size: 0.9rem;
    font-weight: 500;
}

/* Preview Section (Right) */
.preview-section {
    background: #fafbfc;
    padding: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.preview-content {
    width: 100%;
    max-width: 480px;
}

/* Report Preview */
.report-preview {
    background: white;
    border-radius: 24px;
    padding: 32px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.preview-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 32px;
}

.preview-header h3 {
    font-size: 1.4rem;
    font-weight: 700;
    color: #1a1d29;
}

.preview-badge {
    background: #f3f4f6;
    color: #6b7280;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Preview Score */
.preview-score {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 32px;
    padding: 24px;
    background: #f8f9fa;
    border-radius: 16px;
}

.score-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 800;
    color: white;
    flex-shrink: 0;
}

.score-value {
    font-size: 2rem;
}

.score-details h4 {
    font-size: 1.2rem;
    font-weight: 700;
    color: #1a1d29;
    margin-bottom: 4px;
}

.score-details p {
    color: #6b7280;
    font-size: 0.9rem;
}

/* Grade Colors */
.grade-a-plus, .grade-a { 
    background: linear-gradient(135deg, #10b981, #059669); 
}

.grade-b { 
    background: linear-gradient(135deg, #3b82f6, #1d4ed8); 
}

.grade-c { 
    background: linear-gradient(135deg, #f59e0b, #d97706); 
}

.grade-d { 
    background: linear-gradient(135deg, #ef4444, #dc2626); 
}

.grade-f { 
    background: linear-gradient(135deg, #dc2626, #b91c1c); 
}

/* Preview Categories */
.preview-categories {
    margin-bottom: 32px;
}

.category-preview {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px solid #f3f4f6;
}

.category-preview:last-child {
    border-bottom: none;
}

.category-icon {
    font-size: 1.5rem;
    width: 40px;
    text-align: center;
}

.category-info {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.category-info h5 {
    font-size: 1rem;
    font-weight: 600;
    color: #1a1d29;
}

.category-grade {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: 700;
    color: white;
}

/* Preview Issues */
.preview-issues {
    margin-bottom: 32px;
}

.preview-issues h5 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1a1d29;
    margin-bottom: 16px;
}

.issue-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #f3f4f6;
}

.issue-item:last-child {
    border-bottom: none;
}

.issue-severity {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.issue-severity.high {
    background: #ef4444;
}

.issue-severity.medium {
    background: #f59e0b;
}

.issue-severity.low {
    background: #3b82f6;
}

.issue-text {
    font-size: 0.9rem;
    color: #6b7280;
}

.preview-footer {
    text-align: center;
    padding-top: 24px;
    border-top: 1px solid #f3f4f6;
}

.preview-footer p {
    color: #9ca3af;
    font-size: 0.9rem;
    font-style: italic;
}

/* Results Section */
.results-section {
    width: 100%;
    max-width: 480px;
    background: white;
    border-radius: 24px;
    padding: 32px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.06);
    max-height: 80vh;
    overflow-y: auto;
}

/* Security Score in Results */
.security-score {
    text-align: center;
    margin-bottom: 32px;
    padding: 24px;
    background: #f8f9fa;
    border-radius: 16px;
}

.security-score .score-circle {
    width: 100px;
    height: 100px;
    margin: 0 auto 16px;
    font-size: 2.5rem;
}

.domain-header {
    font-size: 1.3rem;
    font-weight: 700;
    color: #1a1d29;
    margin-bottom: 8px;
}

.scan-timestamp {
    color: #6b7280;
    font-size: 0.9rem;
}

/* Categories in Results */
.categories {
    display: grid;
    gap: 24px;
}

.category {
    background: white;
    border-radius: 16px;
    padding: 24px;
    border: 1px solid #f3f4f6;
}

.category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f3f4f6;
}

.category-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.2rem;
    font-weight: 700;
    color: #1a1d29;
}

.category-emoji {
    font-size: 1.5rem;
}

.category-score {
    font-size: 1rem;
    font-weight: 700;
    padding: 8px 16px;
    border-radius: 12px;
    color: white;
}

/* Checks Grid */
.checks-grid {
    display: grid;
    gap: 16px;
}

.check-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    border-radius: 12px;
    background: #fafbfc;
    border: 1px solid #f3f4f6;
    transition: all 0.2s ease;
}

.check-item:hover {
    background: #f8f9fa;
    transform: translateY(-1px);
}

/* Severity Indicators */
.severity-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-top: 6px;
    flex-shrink: 0;
}

.severity-critical { 
    background: #ef4444; 
}

.severity-high { 
    background: #f59e0b; 
}

.severity-medium { 
    background: #3b82f6; 
}

.severity-pass { 
    background: #10b981; 
}

/* Check Content */
.check-content {
    flex: 1;
}

.check-name {
    font-weight: 600;
    color: #1a1d29;
    margin-bottom: 4px;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.check-details {
    color: #6b7280;
    margin-bottom: 8px;
    line-height: 1.5;
    font-size: 0.9rem;
}

.check-remediation {
    background: #f0f9ff;
    padding: 12px;
    border-radius: 8px;
    font-size: 0.85rem;
    color: #1e40af;
    border-left: 3px solid #3b82f6;
}

/* Critical Alerts */
.critical-alerts {
    margin-bottom: 24px;
}

.critical-alerts h3 {
    color: #ef4444;
    margin-bottom: 16px;
    font-size: 1.2rem;
    font-weight: 700;
}

.alert {
    padding: 16px;
    border-radius: 12px;
    margin-bottom: 12px;
    border-left: 4px solid;
}

.alert-critical {
    background: #fef2f2;
    border-color: #ef4444;
    color: #dc2626;
}

.alert-title {
    font-weight: 600;
    margin-bottom: 4px;
}

/* Error Message */
.error-message {
    background: #fef2f2;
    color: #dc2626;
    padding: 20px;
    border-radius: 12px;
    margin: 20px 0;
    border-left: 4px solid #ef4444;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .main-content {
        grid-template-columns: 1fr;
    }
    
    .hero-section {
        min-height: 60vh;
    }
    
    .preview-section {
        padding: 40px;
    }
}

@media (max-width: 768px) {
    .nav-container {
        padding: 0 20px;
    }
    
    .hero-section {
        padding: 40px 20px;
        min-height: 70vh;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .preview-section {
        padding: 20px;
    }
    
    .input-wrapper {
        flex-direction: column;
        gap: 8px;
    }
    
    .scan-button {
        width: 100%;
        justify-content: center;
    }
    
    .trust-indicators {
        flex-direction: column;
        gap: 12px;
    }
    
    .preview-score {
        flex-direction: column;
        text-align: center;
        gap: 16px;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .report-preview {
        padding: 24px;
    }
    
    .category-preview {
        padding: 12px 0;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus styles for keyboard navigation */
input:focus,
button:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .report-preview,
    .results-section {
        border: 2px solid #000;
    }
    
    .check-item {
        border: 2px solid #000;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    body {
        background: #0f172a;
        color: #f1f5f9;
    }
    
    .navbar {
        background: rgba(15, 23, 42, 0.95);
        border-bottom-color: rgba(255, 255, 255, 0.1);
    }
    
    .nav-logo {
        color: #f1f5f9;
    }
    
    .preview-section {
        background: #0f172a;
    }
    
    .report-preview,
    .results-section {
        background: #1e293b;
        border-color: rgba(255, 255, 255, 0.1);
    }
    
    .preview-header h3,
    .domain-header,
    .category-title {
        color: #f1f5f9;
    }
    
    .preview-score,
    .security-score {
        background: #334155;
    }
    
    .category {
        background: #1e293b;
        border-color: rgba(255, 255, 255, 0.1);
    }
    
    .check-item {
        background: #334155;
        border-color: rgba(255, 255, 255, 0.1);
    }
}