/* Modern Professional SSL Checker Styles */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    color-scheme: light dark;
    --primary-50: #eff6ff;
    --primary-100: #dbeafe;
    --primary-500: #3b82f6;
    --primary-600: #2563eb;
    --primary-700: #1d4ed8;
    --success-50: #f0fdf4;
    --success-500: #22c55e;
    --success-600: #16a34a;
    --warning-50: #fffbeb;
    --warning-500: #f59e0b;
    --error-50: #fef2f2;
    --error-500: #ef4444;
    --error-600: #dc2626;
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    color: #1e293b;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Dark Mode - Enhanced contrast */
.dark body {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: #ffffff;
}

/* Light mode text colors */
.text-gray-400 { color: #9ca3af !important; }
.text-gray-500 { color: #6b7280 !important; }
.text-gray-600 { color: #4b5563 !important; }
.text-gray-700 { color: #374151 !important; }
.text-gray-800 { color: #1f2937 !important; }
.text-gray-900 { color: #111827 !important; }

/* Dark mode text colors - ENHANCED CONTRAST */
.dark .text-gray-400 { color: #d1d5db !important; }
.dark .text-gray-500 { color: #9ca3af !important; }
.dark .text-gray-600 { color: #e5e7eb !important; }
.dark .text-gray-700 { color: #f3f4f6 !important; }
.dark .text-gray-800 { color: #ffffff !important; }
.dark .text-gray-900 { color: #ffffff !important; }

/* Dark mode colored badge text fixes */
.dark .bg-gray-50 { background-color: #374151 !important; }
.dark .bg-gray-100 { background-color: #4b5563 !important; }
.dark .bg-blue-100 { background-color: #1e3a8a !important; }
.dark .bg-blue-100.text-blue-800 { color: #bfdbfe !important; }
.dark .text-blue-800 { color: #93c5fd !important; }
.dark .text-blue-200 { color: #dbeafe !important; }

.dark .bg-green-100 { background-color: #166534 !important; }
.dark .bg-green-100.text-green-800 { color: #bbf7d0 !important; }
.dark .text-green-800 { color: #86efac !important; }
.dark .text-green-200 { color: #dcfce7 !important; }

.dark .bg-red-100 { background-color: #991b1b !important; }
.dark .bg-red-100.text-red-800 { color: #fecaca !important; }
.dark .text-red-800 { color: #fca5a5 !important; }
.dark .text-red-200 { color: #fed7d7 !important; }

.dark .bg-yellow-100 { background-color: #a16207 !important; }
.dark .bg-yellow-100.text-yellow-800 { color: #fef3c7 !important; }
.dark .text-yellow-800 { color: #fde68a !important; }

/* Card content contrast - CRITICAL FIX */
.dark .bg-gray-50,
.dark .bg-gray-100 {
    color: #ffffff !important;
}

.dark .bg-gray-50 .text-gray-600,
.dark .bg-gray-50 .text-gray-700,
.dark .bg-gray-50 .text-gray-800,
.dark .bg-gray-50 .text-gray-900 {
    color: #ffffff !important;
}

.dark .bg-gray-50 .text-gray-400,
.dark .bg-gray-50 .text-gray-500 {
    color: #d1d5db !important;
}

/* Specific fixes for card content */
.dark .glass-card .bg-gray-50 {
    background-color: #475569 !important;
    color: #ffffff !important;
}

.dark .glass-card .bg-gray-100 {
    background-color: #64748b !important;
    color: #ffffff !important;
}

/* Force high contrast text in dark mode cards */
.dark .glass-card .text-gray-600 {
    color: #f3f4f6 !important;
}

.dark .glass-card .text-gray-700 {
    color: #ffffff !important;
}

.dark .glass-card .text-gray-900 {
    color: #ffffff !important;
}

.dark .glass-card .text-gray-400 {
    color: #e5e7eb !important;
}

/* Dark mode mono font fixes */
.dark .font-mono {
    color: #f8fafc !important;
}

/* Theme Transitions */
body,
.theme-transition {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Professional Typography */
.text-gradient {
    background: linear-gradient(135deg, var(--primary-600), var(--primary-500));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.dark .text-gradient {
    background: linear-gradient(135deg, #60a5fa, #93c5fd);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Enhanced Card Styles */
.glass-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.1),
        0 1px 0 rgba(255, 255, 255, 0.4) inset;
}

.dark .glass-card {
    background: rgba(15, 23, 42, 0.95);
    border: 1px solid rgba(148, 163, 184, 0.2);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.4),
        0 1px 0 rgba(148, 163, 184, 0.1) inset;
}

.card-hover {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-hover:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.15),
        0 1px 0 rgba(255, 255, 255, 0.4) inset;
}

.dark .card-hover:hover {
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.4),
        0 1px 0 rgba(148, 163, 184, 0.1) inset;
}

/* Professional Buttons */
.btn-primary {
    background: linear-gradient(135deg, var(--primary-600), var(--primary-500));
    border: none;
    color: white;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, var(--primary-700), var(--primary-600));
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.4);
    transform: translateY(-1px);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.btn-secondary {
    background: rgba(148, 163, 184, 0.1);
    border: 1px solid rgba(148, 163, 184, 0.2);
    color: #64748b;
    font-weight: 500;
    backdrop-filter: blur(10px);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-secondary:hover:not(:disabled) {
    background: rgba(148, 163, 184, 0.15);
    border-color: rgba(148, 163, 184, 0.3);
    transform: translateY(-1px);
}

.dark .btn-secondary {
    background: rgba(148, 163, 184, 0.1);
    border: 1px solid rgba(148, 163, 184, 0.2);
    color: #e2e8f0;
}

/* Enhanced Input Styles */
.input-modern {
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid rgba(148, 163, 184, 0.2);
    backdrop-filter: blur(10px);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: inherit;
}

.input-modern:focus {
    outline: none;
    border-color: var(--primary-500);
    box-shadow: 
        0 0 0 3px rgba(59, 130, 246, 0.1),
        0 4px 12px rgba(59, 130, 246, 0.15);
    background: rgba(255, 255, 255, 1);
}

.dark .input-modern {
    background: rgba(30, 41, 59, 0.9);
    border: 2px solid rgba(148, 163, 184, 0.2);
    color: #ffffff;
}

.dark .input-modern:focus {
    background: rgba(30, 41, 59, 1);
    border-color: #60a5fa;
    box-shadow: 
        0 0 0 3px rgba(96, 165, 250, 0.1),
        0 4px 12px rgba(96, 165, 250, 0.15);
}

/* Status Indicators */
.status-valid {
    background: linear-gradient(135deg, var(--success-500), var(--success-600));
    color: white;
    box-shadow: 0 2px 8px rgba(34, 197, 94, 0.3);
}

.status-invalid {
    background: linear-gradient(135deg, var(--error-500), var(--error-600));
    color: white;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
}

.status-warning {
    background: linear-gradient(135deg, var(--warning-500), #f97316);
    color: white;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
}

/* Professional Tabs */
.tab-button {
    position: relative;
    padding: 12px 20px;
    font-weight: 500;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 8px 8px 0 0;
}

.tab-button::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 80%;
    height: 3px;
    background: linear-gradient(135deg, var(--primary-500), var(--primary-600));
    border-radius: 2px;
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.tab-button.active::after {
    transform: translateX(-50%) scaleX(1);
}

.tab-button.active {
    color: var(--primary-600);
    background: rgba(59, 130, 246, 0.05);
}

.dark .tab-button.active {
    color: #60a5fa;
    background: rgba(96, 165, 250, 0.1);
}

/* Code Block Enhancement */
.code-block {
    background: linear-gradient(135deg, #1e293b, #334155);
    border: 1px solid rgba(148, 163, 184, 0.2);
    position: relative;
    overflow: hidden;
}

.code-block::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(148, 163, 184, 0.5), transparent);
}

.dark .code-block {
    background: linear-gradient(135deg, #0f172a, #1e293b);
}

.copy-button {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    opacity: 0;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
}

.code-block:hover .copy-button {
    opacity: 1;
}

.copy-button:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: translateY(-1px);
}

/* Enhanced Animations */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes pulse-success {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.4);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(34, 197, 94, 0);
    }
}

.slide-in-up {
    animation: slideInUp 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.fade-in-scale {
    animation: fadeInScale 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.pulse-success {
    animation: pulse-success 2s infinite;
}

/* Loading States */
.loading-shimmer {
    background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

.dark .loading-shimmer {
    background: linear-gradient(90deg, #1e293b 25%, #334155 50%, #1e293b 75%);
    background-size: 200% 100%;
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* Professional Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: rgba(148, 163, 184, 0.1);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #cbd5e1, #94a3b8);
    border-radius: 3px;
    transition: all 0.2s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #94a3b8, #64748b);
}

.dark ::-webkit-scrollbar-track {
    background: rgba(30, 41, 59, 0.3);
}

.dark ::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #475569, #334155);
}

/* Responsive Design */
@media (max-width: 640px) {
    .tab-button {
        padding: 10px 16px;
        font-size: 14px;
    }
    
    .glass-card {
        margin: 16px;
        border-radius: 16px;
    }
    
    .input-modern {
        font-size: 16px; /* Prevents zoom on iOS */
    }
}

/* Utility Classes */
.bg-gradient-primary {
    background: linear-gradient(135deg, var(--primary-600), var(--primary-500));
}

.text-shadow {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.dark .text-shadow {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Feature Cards */
.feature-card {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.feature-card:hover {
    background: rgba(255, 255, 255, 0.95);
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
}

.dark .feature-card {
    background: rgba(30, 41, 59, 0.8);
    border: 1px solid rgba(148, 163, 184, 0.1);
}

.dark .feature-card:hover {
    background: rgba(30, 41, 59, 0.95);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3);
}

/* Professional Badge Styles */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Toast Notifications */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: 500;
    backdrop-filter: blur(10px);
    z-index: 1000;
    animation: slideInUp 0.3s ease;
}

.toast.success {
    background: rgba(34, 197, 94, 0.9);
}

.toast.error {
    background: rgba(239, 68, 68, 0.9);
}

/* Additional dark mode improvements */
.dark .bg-gray-50 {
    background-color: rgba(15, 23, 42, 0.8) !important;
}

.dark .bg-gray-100 {
    background-color: rgba(30, 41, 59, 0.8) !important;
}

/* Fix for bg-gray-700/50 class used in components */
.bg-gray-50.dark\:bg-gray-700\/50,
.dark .bg-gray-50,
.dark [class*="bg-gray-700/50"] {
    background-color: rgba(15, 23, 42, 0.8) !important;
}

/* Improve text contrast on dark backgrounds */
.dark .font-mono {
    color: #ffffff !important;
}

.dark .break-all {
    color: #ffffff !important;
}
