:root {
    /* Colors - Light Mode */
    --background: #ffffff;
    --foreground: #000000;
    --card: #ffffff;
    --card-foreground: #000000;
    --border: #e5e5e5;
    --input: #f5f5f5;
    --primary: #000000;
    --primary-foreground: #ffffff;
    --secondary: #f5f5f5;
    --secondary-foreground: #000000;
    --muted: #f5f5f5;
    --muted-foreground: #737373;
    --accent: #f5f5f5;
    --accent-foreground: #000000;
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
    --gradient-1: #667eea;
    --gradient-2: #764ba2;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

[data-theme="dark"] {
    --background: #000000;
    --foreground: #ffffff;
    --card: #0a0a0a;
    --card-foreground: #ffffff;
    --border: #262626;
    --input: #171717;
    --primary: #ffffff;
    --primary-foreground: #000000;
    --secondary: #171717;
    --secondary-foreground: #ffffff;
    --muted: #171717;
    --muted-foreground: #a3a3a3;
    --accent: #171717;
    --accent-foreground: #ffffff;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.5);
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.5), 0 1px 2px -1px rgb(0 0 0 / 0.5);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.5), 0 2px 4px -2px rgb(0 0 0 / 0.5);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.5), 0 4px 6px -4px rgb(0 0 0 / 0.5);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    background-color: var(--background);
    color: var(--foreground);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Background Gradient */
.background-gradient {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 100vh;
    background: radial-gradient(circle at 20% 20%, rgba(102, 126, 234, 0.05) 0%, transparent 50%),
                radial-gradient(circle at 80% 80%, rgba(118, 75, 162, 0.05) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

[data-theme="dark"] .background-gradient {
    background: radial-gradient(circle at 20% 20%, rgba(102, 126, 234, 0.08) 0%, transparent 50%),
                radial-gradient(circle at 80% 80%, rgba(118, 75, 162, 0.08) 0%, transparent 50%);
}

[data-theme="dark"] .invert-on-dark {
    filter: invert(1);
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}



/* Navigation */
.nav {
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(12px);
    background-color: rgba(255, 255, 255, 0.8);
    border-bottom: 1px solid var(--border);
    transition: all 0.3s ease;
}

[data-theme="dark"] .nav {
    background-color: rgba(0, 0, 0, 0.8);
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 64px;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--foreground);
}

.nav-logo svg {
    color: var(--primary);
}

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

/* Theme Toggle */
.theme-toggle {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--background);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    position: relative;
}

.theme-toggle:hover {
    background: var(--secondary);
    border-color: var(--primary);
}

.sun-icon,
.moon-icon {
    transition: all 0.3s ease;
    color: var(--foreground);
}

.sun-icon {
    color: #f59e0b;
}

.moon-icon {
    color: #6366f1;
}

[data-theme="light"] .moon-icon,
[data-theme="dark"] .sun-icon {
    display: none;
}

/* Hero Section */
.hero {
    padding: 6rem 0 4rem;
}

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

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 0.875rem;
    border-radius: 9999px;
    background: var(--secondary);
    border: 1px solid var(--border);
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 2rem;
    animation: fadeIn 0.6s ease-out;
}

.badge-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--success);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.hero-title {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
    animation: fadeInUp 0.6s ease-out 0.1s backwards;
}

.gradient-text {
    background: linear-gradient(135deg, var(--gradient-1), var(--gradient-2));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-description {
    font-size: 1.25rem;
    color: var(--muted-foreground);
    max-width: 700px;
    margin: 0 auto 2.5rem;
    animation: fadeInUp 0.6s ease-out 0.2s backwards;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeInUp 0.6s ease-out 0.3s backwards;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    white-space: nowrap;
}

.btn-primary {
    background: var(--primary);
    color: var(--primary-foreground);
}

.btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: var(--secondary);
    color: var(--secondary-foreground);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--accent);
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

.btn-icon {
    width: 32px;
    height: 32px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: var(--muted-foreground);
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.btn-icon:hover {
    background: var(--secondary);
    color: var(--foreground);
}

/* Checker Section */
.checker-section {
    padding: 2rem 0 4rem;
}

.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: var(--shadow);
    animation: fadeInUp 0.6s ease-out;
}

.card-header {
    margin-bottom: 2rem;
}

.card-header h2 {
    font-size: 1.875rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.card-header p {
    color: var(--muted-foreground);
}

.card-body {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Input Group */
.input-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.input-group label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--foreground);
}

.textarea-wrapper {
    position: relative;
}

textarea {
    width: 100%;
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--input);
    color: var(--foreground);
    font-family: inherit;
    font-size: 0.9375rem;
    resize: vertical;
    min-height: 200px;
    transition: all 0.2s ease;
}

textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] textarea:focus {
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.05);
}

.textarea-actions {
    position: absolute;
    bottom: 0.75rem;
    right: 0.75rem;
    display: flex;
    gap: 0.5rem;
}

/* Upload Area */
.upload-area {
    border: 2px dashed var(--border);
    border-radius: 12px;
    padding: 2rem;
    transition: all 0.2s ease;
}

.upload-area:hover {
    border-color: var(--primary);
    background: var(--secondary);
}

.upload-area.drag-over {
    border-color: var(--primary);
    background: var(--secondary);
}

.upload-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    cursor: pointer;
    text-align: center;
}

.upload-label svg {
    color: var(--muted-foreground);
}

.upload-text {
    font-size: 1rem;
    font-weight: 500;
    color: var(--foreground);
}

.upload-hint {
    font-size: 0.875rem;
    color: var(--muted-foreground);
}

/* Progress Bar */
.progress-container {
    width: 100%;
    height: 4px;
    background: var(--secondary);
    border-radius: 9999px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--gradient-1), var(--gradient-2));
    transition: width 0.3s ease;
    border-radius: 9999px;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 1rem;
}

.action-buttons .btn {
    flex: 1;
}

/* Export Section */
.export-section {
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

.export-section h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--muted-foreground);
}

.export-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 0.75rem;
}

.export-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 0.5rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--card);
    color: var(--foreground);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.export-btn:hover:not(:disabled) {
    background: var(--secondary);
    border-color: var(--primary);
}

.export-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.export-btn svg {
    color: var(--muted-foreground);
}

/* Results Section */
.results-section {
    margin-top: 3rem;
    animation: fadeInUp 0.6s ease-out;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.results-header h3 {
    font-size: 1.5rem;
    font-weight: 700;
}

.results-header p {
    color: var(--muted-foreground);
    font-size: 0.875rem;
}

.results-controls {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.filter-select {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--background);
    color: var(--foreground);
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-select:focus {
    outline: none;
    border-color: var(--primary);
}

/* Results Grid */
.results-grid {
    display: grid;
    gap: 1rem;
}

.result-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.2s ease;
    animation: fadeInUp 0.3s ease-out;
}

.result-card:hover {
    box-shadow: var(--shadow-md);
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 1rem;
    gap: 1rem;
}

.result-number {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--muted-foreground);
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.status-found {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.status-not-found {
    background: rgba(239, 68, 68, 0.1);
    color: var(--error);
}

.status-error {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
}

.result-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.result-title a {
    color: var(--foreground);
    text-decoration: none;
    transition: color 0.2s ease;
}

.result-title a:hover {
    color: var(--gradient-1);
}

.result-meta {
    display: grid;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--muted-foreground);
}

.meta-row {
    display: flex;
    gap: 0.5rem;
}

.meta-label {
    font-weight: 600;
    min-width: 80px;
}

.meta-value {
    color: var(--foreground);
}

.meta-value a {
    color: var(--gradient-1);
    text-decoration: none;
}

.meta-value a:hover {
    text-decoration: underline;
}

/* Features Section */
.features-section {
    padding: 6rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header h2 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
}

.section-header p {
    font-size: 1.125rem;
    color: var(--muted-foreground);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.feature-card {
    padding: 2rem;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--card);
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--gradient-1), var(--gradient-2));
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.feature-icon svg {
    color: white;
}

.feature-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.feature-card p {
    color: var(--muted-foreground);
    line-height: 1.6;
}

/* Footer */
.footer {
    border-top: 1px solid var(--border);
    padding: 4rem 0 2rem;
    margin-top: 6rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 2rem;
}

.footer-brand p {
    color: var(--muted-foreground);
    margin-top: 0.5rem;
    max-width: 300px;
}

.footer-links {
    display: flex;
    gap: 1rem;
}

.footer-links a {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--foreground);
    transition: all 0.2s ease;
}

.footer-links a:hover {
    background: var(--secondary);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}

.footer-bottom p {
    color: var(--muted-foreground);
    font-size: 0.875rem;
}

/* Toast */
.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1rem 1.5rem;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 1rem;
    max-width: 400px;
    transform: translateY(calc(100% + 2rem));
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 100;
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

.toast-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
}

.toast-icon {
    flex-shrink: 0;
    color: var(--foreground);
}

.toast.success .toast-icon {
    color: var(--success);
}

.toast.error .toast-icon {
    color: var(--error);
}

.toast.warning .toast-icon {
    color: var(--warning);
}

.toast-close {
    background: none;
    border: none;
    color: var(--muted-foreground);
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
}

.toast-close:hover {
    color: var(--foreground);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .hero {
        padding: 4rem 0 2rem;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-description {
        font-size: 1.125rem;
    }

    .hero-actions {
        flex-direction: column;
        width: 100%;
    }

    .hero-actions .btn {
        width: 100%;
    }

    .card {
        padding: 1.5rem;
    }

    .results-header {
        flex-direction: column;
        align-items: start;
    }

    .results-controls {
        width: 100%;
    }

    .filter-select {
        flex: 1;
    }

    .export-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .toast {
        left: 1rem;
        right: 1rem;
        bottom: 1rem;
        max-width: none;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .footer-content {
        flex-direction: column;
    }
}

/* Smooth transitions for theme switching */
* {
    transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

button, a, input, textarea, select {
    transition: all 0.2s ease;
}