/* BlackAnt Checker - Custom Styles */
/* Import Modern Minimalist Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@100;200;300;400;500;600;700;800;900&family=JetBrains+Mono:wght@300;400;500;600;700&display=swap');

/* Dark Theme Variables */
:root {
    --primary-bg: #111827;
    --secondary-bg: #1f2937;
    --accent-bg: #374151;
    --border-color: #4b5563;
    --text-primary: #ffffff;
    --text-secondary: #d1d5db;
    --text-muted: #9ca3af;
    --accent-color: #3b82f6;
    --success-color: #10b981;
    --error-color: #ef4444;
    --warning-color: #f59e0b;
    
    /* Font Variables */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    --font-mono: 'JetBrains Mono', 'SF Mono', 'Monaco', 'Inconsolata', 'Fira Code', monospace;
}

/* Global Font Application */
* {
    font-family: var(--font-primary);
    font-feature-settings: 'liga' 1, 'calt' 1, 'kern' 1;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

body {
    font-family: var(--font-primary);
    font-weight: 400;
    line-height: 1.6;
    letter-spacing: -0.01em;
}

/* Heading Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-primary);
    font-weight: 600;
    line-height: 1.25;
    letter-spacing: -0.025em;
}

h1 { font-size: 2.25rem; font-weight: 700; }
h2 { font-size: 1.875rem; font-weight: 600; }
h3 { font-size: 1.5rem; font-weight: 600; }
h4 { font-size: 1.25rem; font-weight: 600; }
h5 { font-size: 1.125rem; font-weight: 500; }
h6 { font-size: 1rem; font-weight: 500; }

/* Code and Monospace */
code, pre, .font-mono {
    font-family: var(--font-mono);
    font-size: 0.875em;
    font-weight: 400;
}

/* Input and Form Typography */
input, textarea, select, button {
    font-family: var(--font-primary);
    font-weight: 400;
    letter-spacing: -0.01em;
}

/* Button Typography */
button {
    font-weight: 500;
    letter-spacing: -0.01em;
}

/* Navigation Typography */
nav {
    font-family: var(--font-primary);
    font-weight: 500;
}

/* Table Typography */
table {
    font-variant-numeric: tabular-nums;
}

/* Small Text */
.text-xs { font-size: 0.75rem; line-height: 1rem; }
.text-sm { font-size: 0.875rem; line-height: 1.25rem; }
.text-base { font-size: 1rem; line-height: 1.5rem; }
.text-lg { font-size: 1.125rem; line-height: 1.75rem; }
.text-xl { font-size: 1.25rem; line-height: 1.75rem; }
.text-2xl { font-size: 1.5rem; line-height: 2rem; }
.text-3xl { font-size: 1.875rem; line-height: 2.25rem; }

/* Font Weights */
.font-thin { font-weight: 100; }
.font-light { font-weight: 300; }
.font-normal { font-weight: 400; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.font-extrabold { font-weight: 800; }
.font-black { font-weight: 900; }

/* Custom scrollbar for dark theme */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--secondary-bg);
}

::-webkit-scrollbar-thumb {
    background: var(--accent-bg);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--border-color);
}

/* Smooth transitions */
* {
    transition: all 0.2s ease-in-out;
}

/* Loading animation */
.loading {
    position: relative;
}

.loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    margin: auto;
    border: 2px solid transparent;
    border-top-color: var(--accent-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Pulse animation for buttons */
.pulse-on-hover:hover {
    animation: pulse 0.5s ease-in-out;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Fade in animation */
.fade-in {
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Card hover effects */
.card-hover:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

/* Status indicators */
.status-live {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #10b981;
}

.status-dead {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #ef4444;
}

.status-unknown {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.3);
    color: #f59e0b;
}

/* Focus states for accessibility */
.focus-visible:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

/* Advanced Responsive Design */

/* Mobile First - Base Styles */
@media (min-width: 320px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .grid-responsive {
        display: grid;
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .text-responsive {
        font-size: clamp(0.875rem, 2.5vw, 1rem);
    }
    
    .heading-responsive {
        font-size: clamp(1.5rem, 5vw, 2.25rem);
    }
}

/* Small Tablets */
@media (min-width: 480px) {
    .container {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
    
    .grid-responsive {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 1.5rem;
    }
}

/* Tablets */
@media (min-width: 768px) {
    .container {
        padding-left: 2rem;
        padding-right: 2rem;
    }
    
    .grid-responsive {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 2rem;
    }
    
    .nav-desktop {
        display: flex;
    }
    
    .nav-mobile {
        display: none;
    }
}

/* Desktop */
@media (min-width: 1024px) {
    .container {
        max-width: 1200px;
        margin-left: auto;
        margin-right: auto;
    }
    
    .grid-responsive {
        grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
        gap: 2.5rem;
    }
}

/* Large Desktop */
@media (min-width: 1280px) {
    .container {
        max-width: 1400px;
    }
}

/* Mobile specific styles */
@media (max-width: 767px) {
    /* Mobile Navigation */
    .nav-mobile {
        display: block;
    }
    
    .nav-desktop {
        display: none;
    }
    
    /* Mobile Menu Toggle */
    .mobile-menu-button {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        border: none;
        background: transparent;
        color: white;
        cursor: pointer;
    }
    
    .mobile-menu {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(17, 24, 39, 0.95);
        backdrop-filter: blur(10px);
        z-index: 9999;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 2rem;
        transform: translateX(-100%);
        transition: transform 0.3s ease-out;
    }
    
    .mobile-menu.open {
        transform: translateX(0);
    }
    
    .mobile-menu-link {
        font-size: 1.5rem;
        font-weight: 500;
        color: white;
        text-decoration: none;
        padding: 1rem 2rem;
        border-radius: 0.5rem;
        transition: all 0.3s;
    }
    
    .mobile-menu-link:hover {
        background: rgba(59, 130, 246, 0.1);
        color: #3b82f6;
    }
    
    /* Mobile Stack */
    .mobile-stack {
        flex-direction: column;
    }
    
    .mobile-stack > * {
        width: 100%;
        margin-bottom: 1rem;
    }
    
    /* Mobile Cards */
    .mobile-card {
        margin-bottom: 1rem;
    }
    
    .mobile-full-width {
        width: 100%;
    }
    
    .mobile-text-center {
        text-align: center;
    }
    
    /* Hide desktop-only elements */
    .desktop-only {
        display: none !important;
    }
    
    /* Mobile form adjustments */
    .mobile-form input,
    .mobile-form textarea,
    .mobile-form select {
        font-size: 16px; /* Prevent zoom on iOS */
        padding: 0.75rem;
    }
    
    /* Mobile button adjustments */
    .mobile-button {
        padding: 1rem 2rem;
        font-size: 1rem;
        width: 100%;
        margin-bottom: 0.5rem;
    }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    .touch-target {
        min-height: 44px;
        min-width: 44px;
    }
    
    .touch-button {
        padding: 0.75rem 1.5rem;
    }
    
    /* Remove hover effects on touch devices */
    .no-touch-hover:hover {
        transform: none;
        box-shadow: none;
    }
}

/* Orientation specific styles */
@media (orientation: landscape) and (max-height: 500px) {
    .landscape-adjust {
        height: 80vh;
        overflow-y: auto;
    }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .retina-optimize {
        image-rendering: -webkit-optimize-contrast;
    }
}

/* Reduced motion accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
}

/* Custom input styles for CC form */
.cc-input:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.cc-input.error {
    border-color: var(--error-color);
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

/* Typography enhancements */
.brand-text {
    background: linear-gradient(45deg, #3b82f6, #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Modal backdrop */
.modal-backdrop {
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

/* Advanced Animations & Micro-interactions */
@keyframes slideInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(-30px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes shimmer {
    0% { background-position: -200px 0; }
    100% { background-position: calc(200px + 100%) 0; }
}

@keyframes bounceIn {
    0% { opacity: 0; transform: scale(0.3); }
    50% { transform: scale(1.05); }
    70% { transform: scale(0.9); }
    100% { opacity: 1; transform: scale(1); }
}

/* Animation Classes */
.animate-slideInUp {
    animation: slideInUp 0.6s ease-out;
}

.animate-slideInRight {
    animation: slideInRight 0.5s ease-out;
}

.animate-scaleIn {
    animation: scaleIn 0.4s ease-out;
}

.animate-bounceIn {
    animation: bounceIn 0.6s ease-out;
}

.animate-shimmer {
    background: linear-gradient(90deg, #374151 25%, #4b5563 50%, #374151 75%);
    background-size: 200px 100%;
    animation: shimmer 1.5s infinite;
}

/* Loading States */
.skeleton {
    background: linear-gradient(90deg, #374151 25%, #4b5563 50%, #374151 75%);
    background-size: 200px 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 6px;
    overflow: hidden;
}

.skeleton-text {
    height: 1rem;
    margin-bottom: 0.5rem;
}

.skeleton-title {
    height: 1.5rem;
    width: 60%;
    margin-bottom: 0.75rem;
}

/* Enhanced Button Animations */
.btn-animated {
    position: relative;
    overflow: hidden;
    transform: translateZ(0);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-animated:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.btn-animated:active {
    transform: translateY(0);
    transition: all 0.1s;
}

.btn-animated::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s;
}

.btn-animated:hover::before {
    left: 100%;
}

/* Progress Bar Animation */
.progress-bar {
    background: linear-gradient(45deg, #3b82f6, #8b5cf6);
    background-size: 200% 200%;
    animation: gradientShift 2s ease infinite;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Toast Notification Styles */
.toast {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 9999;
    min-width: 300px;
    padding: 1rem 1.5rem;
    border-radius: 0.5rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    transform: translateX(100%);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.toast.show {
    transform: translateX(0);
}

.toast.success {
    background: rgba(16, 185, 129, 0.9);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: white;
}

.toast.error {
    background: rgba(239, 68, 68, 0.9);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: white;
}

.toast.warning {
    background: rgba(245, 158, 11, 0.9);
    border: 1px solid rgba(245, 158, 11, 0.3);
    color: white;
}

.toast.info {
    background: rgba(59, 130, 246, 0.9);
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: white;
}

/* Enhanced Card Animations */
.card-modern {
    backdrop-filter: blur(10px);
    background: rgba(31, 41, 55, 0.8);
    border: 1px solid rgba(75, 85, 99, 0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.card-modern::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.5), transparent);
    opacity: 0;
    transition: opacity 0.3s;
}

.card-modern:hover::before {
    opacity: 1;
}

.card-modern:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    border-color: rgba(59, 130, 246, 0.3);
}

/* Ripple Effect */
.ripple {
    position: relative;
    overflow: hidden;
}

.ripple::after {
    content: '';
    position: absolute;
    width: 100px;
    height: 100px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transform: scale(0);
    opacity: 1;
    pointer-events: none;
}

.ripple:active::after {
    animation: rippleEffect 0.6s ease-out;
}

@keyframes rippleEffect {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* Stagger Animation */
.stagger-item {
    opacity: 0;
    transform: translateY(20px);
    animation: staggerIn 0.6s ease-out forwards;
}

.stagger-item:nth-child(1) { animation-delay: 0.1s; }
.stagger-item:nth-child(2) { animation-delay: 0.2s; }
.stagger-item:nth-child(3) { animation-delay: 0.3s; }
.stagger-item:nth-child(4) { animation-delay: 0.4s; }
.stagger-item:nth-child(5) { animation-delay: 0.5s; }

@keyframes staggerIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Utility classes */
.text-shadow {
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.glass-effect {
    background: rgba(31, 41, 55, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(75, 85, 99, 0.3);
}

/* Smooth Page Transitions */
body {
    scroll-behavior: smooth;
}

.page-transition {
    opacity: 0;
    transform: translateY(20px);
    animation: pageEnter 0.5s ease-out forwards;
}

@keyframes pageEnter {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
