:root {
    /* Colors - Light Theme */
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;
    --bg-card: #ffffff;
    
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-tertiary: #94a3b8;
    --text-muted: #cbd5e1;
    
    --accent-primary: #3b82f6;
    --accent-primary-light: #dbeafe;
    --accent-primary-dark: #1d4ed8;
    
    --accent-success: #22c55e;
    --accent-success-light: #dcfce7;
    --accent-warning: #f59e0b;
    --accent-warning-light: #fef3c7;
    --accent-danger: #ef4444;
    --accent-danger-light: #fee2e2;
    --accent-purple: #8b5cf6;
    --accent-purple-light: #ede9fe;
    
    --border-color: #e2e8f0;
    --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);
    
    --radius-sm: 6px;
    --radius: 10px;
    --radius-lg: 16px;
    
    --transition: all 0.2s ease;
}

/* Dark Theme */
[data-theme="dark"] {
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-tertiary: #334155;
    --bg-card: #1e293b;
    
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-tertiary: #64748b;
    --text-muted: #475569;
    
    --border-color: #334155;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-secondary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Navbar */
.navbar {
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 700;
    font-size: 1.25rem;
}

.nav-logo svg {
    width: 28px;
    height: 28px;
    color: var(--accent-primary);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-btn {
    padding: 8px 16px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
}

.nav-btn:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.nav-btn.active {
    background: var(--accent-primary-light);
    color: var(--accent-primary);
}

.nav-stat {
    font-size: 14px;
    color: var(--text-secondary);
    padding: 0 12px;
}

.theme-toggle {
    width: 36px;
    height: 36px;
    border: none;
    background: var(--bg-tertiary);
    border-radius: var(--radius);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

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

.mobile-menu-btn {
    display: none;
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    cursor: pointer;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
}

.mobile-menu-btn span {
    width: 20px;
    height: 2px;
    background: var(--text-secondary);
    border-radius: 2px;
    transition: var(--transition);
}

/* Sections */
.whois-section,
.showcase-section {
    display: none;
    padding: 40px 0;
}

.whois-section.active,
.showcase-section.active {
    display: block;
}

/* WHOIS Section */
.whois-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 48px;
    box-shadow: var(--shadow);
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.section-desc {
    color: var(--text-secondary);
    margin-bottom: 32px;
}

.whois-form {
    margin-bottom: 32px;
}

.input-group {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.whois-input {
    flex: 1;
    padding: 14px 18px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 16px;
    background: var(--bg-primary);
    color: var(--text-primary);
    transition: var(--transition);
}

.whois-input:focus {
    outline: none;
    border-color: var(--accent-primary);
}

.whois-btn {
    padding: 14px 28px;
    background: var(--accent-primary);
    color: white;
    border: none;
    border-radius: var(--radius);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}

.whois-btn:hover {
    background: var(--accent-primary-dark);
}

.whois-btn svg {
    width: 18px;
    height: 18px;
}

.whois-options {
    display: flex;
    justify-content: center;
    gap: 24px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-secondary);
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--accent-primary);
}

/* WHOIS Result */
.whois-result {
    text-align: left;
}

.result-placeholder {
    padding: 60px 20px;
    text-align: center;
    color: var(--text-tertiary);
}

.result-placeholder svg {
    width: 64px;
    height: 64px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.result-placeholder p {
    font-size: 16px;
}

.result-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-color);
    border-top-color: var(--accent-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-bottom: 16px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.result-card {
    background: var(--bg-secondary);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 16px;
}

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

.result-domain {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.result-status {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.result-status.available {
    background: var(--accent-success-light);
    color: var(--accent-success);
}

.result-status.registered {
    background: var(--accent-danger-light);
    color: var(--accent-danger);
}

.result-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.result-item {
    background: var(--bg-card);
    padding: 16px;
    border-radius: var(--radius-sm);
}

.result-label {
    font-size: 12px;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.result-value {
    font-size: 14px;
    color: var(--text-primary);
    font-weight: 500;
}

.result-raw {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 16px;
    font-family: 'Monaco', 'Consolas', monospace;
    font-size: 12px;
    line-height: 1.6;
    white-space: pre-wrap;
    word-break: break-word;
    max-height: 400px;
    overflow-y: auto;
    color: var(--text-secondary);
}

/* Filter Section */
.filter-section {
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    padding: 20px 0;
    position: sticky;
    top: 64px;
    z-index: 50;
}

.filter-bar {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.search-box {
    position: relative;
    flex: 1;
    min-width: 240px;
    max-width: 400px;
}

.search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: var(--text-tertiary);
    pointer-events: none;
}

.search-input {
    width: 100%;
    padding: 12px 14px 12px 44px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 14px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    transition: var(--transition);
}

.search-input:focus {
    outline: none;
    border-color: var(--accent-primary);
    background: var(--bg-primary);
}

.filter-group {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.filter-select {
    padding: 10px 32px 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 14px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    min-width: 120px;
}

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

.filter-actions {
    display: flex;
    gap: 8px;
}

.icon-btn {
    width: 40px;
    height: 40px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    background: var(--bg-secondary);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.icon-btn:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.icon-btn svg {
    width: 18px;
    height: 18px;
}

.filter-result {
    margin-left: auto;
    font-size: 14px;
    color: var(--text-secondary);
}

.result-count {
    font-weight: 600;
    color: var(--accent-primary);
}

/* Domain Section */
.domain-section {
    padding: 32px 0;
}

.domain-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

/* Domain Card */
.domain-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 20px;
    transition: var(--transition);
    position: relative;
}

.domain-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.domain-card.expiring {
    border-color: var(--accent-warning);
    background: linear-gradient(135deg, var(--bg-card) 0%, var(--accent-warning-light) 100%);
}

.domain-card.critical {
    border-color: var(--accent-danger);
    background: linear-gradient(135deg, var(--bg-card) 0%, var(--accent-danger-light) 100%);
}

.domain-card.expired {
    border-color: #64748b;
    background: linear-gradient(135deg, var(--bg-card) 0%, #f1f5f9 100%);
}

.domain-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 12px;
}

.domain-name {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
    word-break: break-all;
    line-height: 1.4;
}

.domain-premium {
    padding: 4px 8px;
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: white;
    font-size: 10px;
    font-weight: 700;
    border-radius: 4px;
    text-transform: uppercase;
}

.domain-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
}

.badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
}

.badge-registrar {
    background: var(--accent-purple-light);
    color: var(--accent-purple);
}

.badge-date {
    background: var(--accent-success-light);
    color: var(--accent-success);
}

.badge-expire {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
}

.badge-expire.warning {
    background: var(--accent-warning-light);
    color: var(--accent-warning);
}

.badge-expire.critical {
    background: var(--accent-danger-light);
    color: var(--accent-danger);
}

.badge-tld {
    background: var(--accent-primary-light);
    color: var(--accent-primary);
}

.domain-desc {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-top: 8px;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 80px 20px;
    color: var(--text-tertiary);
}

.empty-state svg {
    width: 80px;
    height: 80px;
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-state p {
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.empty-state span {
    font-size: 14px;
}

/* Pagination */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 40px;
    padding: 20px 0;
}

.page-btn {
    width: 36px;
    height: 36px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--bg-card);
    color: var(--text-secondary);
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition);
}

.page-btn:hover:not(:disabled) {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

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

.page-btn.active {
    background: var(--accent-primary);
    color: white;
    border-color: var(--accent-primary);
}

.page-numbers {
    display: flex;
    gap: 4px;
}

.page-info {
    font-size: 14px;
    color: var(--text-secondary);
    margin-left: 16px;
}

/* Footer */
.footer {
    background: var(--bg-primary);
    border-top: 1px solid var(--border-color);
    padding: 24px 0;
    margin-top: 60px;
}

.footer-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    color: var(--text-primary);
}

.footer-brand svg {
    width: 20px;
    height: 20px;
    color: var(--accent-primary);
}

.footer-text {
    font-size: 14px;
    color: var(--text-secondary);
}

.footer-links {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
}

.footer-links a {
    color: var(--accent-primary);
    text-decoration: none;
}

.footer-links a:hover {
    text-decoration: underline;
}

.footer-links .divider {
    color: var(--text-muted);
}

/* Responsive */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    .mobile-menu-btn {
        display: flex;
    }
    
    .whois-card {
        padding: 24px;
    }
    
    .input-group {
        flex-direction: column;
    }
    
    .whois-btn {
        width: 100%;
        justify-content: center;
    }
    
    .filter-bar {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-box {
        max-width: none;
    }
    
    .filter-group {
        justify-content: stretch;
    }
    
    .filter-select {
        flex: 1;
    }
    
    .filter-result {
        margin-left: 0;
        text-align: center;
    }
    
    .domain-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
}

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

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--text-muted);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-tertiary);
}
