/* ================================================
   AI Domain Checker — Premium Dark Theme
   ================================================ */

:root {
    --primary: #0a0a0f;
    --primary-light: #12121a;
    --surface: #161620;
    --surface-light: #1c1c28;
    --surface-hover: #242430;

    --accent: #6c63ff;
    --accent-hover: #8b84ff;
    --accent-dark: #5a52e0;
    --accent-glow: rgba(108, 99, 255, 0.15);

    --secondary: #00d4aa;
    --secondary-glow: rgba(0, 212, 170, 0.15);

    --cyber: #00e5ff;
    --cyber-glow: rgba(0, 229, 255, 0.1);

    --danger: #ef4444;
    --success: #10b981;
    --warning: #f59e0b;

    --text-main: #e0e0e8;
    --text-muted: #6b6b80;
    --text-heading: #ffffff;

    --bg-body: #08080d;
    --bg-card: rgba(255, 255, 255, 0.025);
    --border-color: rgba(255, 255, 255, 0.06);
    --border-hover: rgba(108, 99, 255, 0.25);

    --radius-sm: 10px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-xl: 28px;

    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 30px rgba(108, 99, 255, 0.15);

    --font-family: 'Cairo', system-ui, -apple-system, sans-serif;

    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --transition-slow: 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-family);
    background-color: var(--bg-body);
    color: var(--text-main);
    min-height: 100vh;
    direction: rtl;
    overflow-x: hidden;
    line-height: 1.6;
}

/* Cosmic background pattern */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(108, 99, 255, 0.04) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(0, 212, 170, 0.03) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 80%, rgba(0, 229, 255, 0.02) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

body::after {
    content: '';
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.008) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.008) 1px, transparent 1px);
    background-size: 80px 80px;
    pointer-events: none;
    z-index: 0;
}

/* ========== TYPOGRAPHY ========== */
h1, h2, h3, h4, h5, h6 { font-weight: 800; color: var(--text-heading); margin: 0; }
a { text-decoration: none; color: inherit; transition: var(--transition-fast); }
p { line-height: 1.7; color: var(--text-muted); }

/* ========== CONTAINER ========== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 25px;
    position: relative;
    z-index: 1;
}

/* ========== HEADER ========== */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(8, 8, 13, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    transition: var(--transition-normal);
}

.main-header.scrolled {
    background: rgba(8, 8, 13, 0.92);
    border-bottom-color: rgba(108, 99, 255, 0.1);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    font-weight: 800;
    color: white;
}

.logo-icon {
    font-size: 24px;
    filter: drop-shadow(0 0 8px rgba(108, 99, 255, 0.4));
}

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

.main-nav ul {
    list-style: none;
    display: flex;
    gap: 8px;
}

.main-nav ul li a {
    padding: 8px 18px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 14px;
    color: var(--text-muted);
    transition: var(--transition-fast);
}

.main-nav ul li a:hover,
.main-nav ul li a.active {
    color: white;
    background: rgba(108, 99, 255, 0.1);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 5px;
}

.menu-toggle span {
    width: 24px;
    height: 2px;
    background: white;
    border-radius: 2px;
    transition: var(--transition-fast);
}

/* ========== BUTTONS ========== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    border: none;
    transition: var(--transition-normal);
    gap: 8px;
    font-family: var(--font-family);
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    color: white;
    box-shadow: 0 4px 20px rgba(108, 99, 255, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--accent-hover), var(--accent));
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(108, 99, 255, 0.4);
}

.btn-primary::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transform: translateX(100%);
    transition: transform 0.6s;
}

.btn-primary:hover::after {
    transform: translateX(-100%);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-main);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--accent);
    color: white;
}

.btn-success-custom {
    background: linear-gradient(135deg, var(--success), #059669);
    color: white;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.btn-danger-custom {
    background: linear-gradient(135deg, var(--danger), #dc2626);
    color: white;
}

.btn-lg {
    padding: 16px 36px;
    font-size: 16px;
    border-radius: var(--radius-md);
}

/* ========== HERO SECTION ========== */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 120px 25px 80px;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -200px;
    left: 50%;
    transform: translateX(-50%);
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(108, 99, 255, 0.08) 0%, transparent 60%);
    border-radius: 50%;
    pointer-events: none;
    animation: heroGlow 8s ease-in-out infinite;
}

@keyframes heroGlow {
    0%, 100% { opacity: 0.5; transform: translateX(-50%) scale(1); }
    50% { opacity: 1; transform: translateX(-50%) scale(1.1); }
}

.hero-content {
    text-align: center;
    max-width: 800px;
    position: relative;
    z-index: 2;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(108, 99, 255, 0.1);
    border: 1px solid rgba(108, 99, 255, 0.2);
    padding: 8px 20px;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 700;
    color: var(--accent-hover);
    margin-bottom: 25px;
    animation: fadeInUp 0.6s ease-out;
}

.hero-badge .badge-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
    animation: pulseDot 2s ease-in-out infinite;
}

@keyframes pulseDot {
    0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(108, 99, 255, 0.5); }
    50% { opacity: 0.7; box-shadow: 0 0 0 8px rgba(108, 99, 255, 0); }
}

.hero-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 900;
    line-height: 1.3;
    margin-bottom: 20px;
    animation: fadeInUp 0.6s ease-out 0.1s both;
}

.hero-title .gradient-text {
    background: linear-gradient(135deg, var(--accent), var(--secondary), var(--cyber));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: clamp(0.95rem, 2vw, 1.15rem);
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 40px;
    animation: fadeInUp 0.6s ease-out 0.2s both;
}

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

/* ========== SEARCH BOX ========== */
.search-container {
    animation: fadeInUp 0.6s ease-out 0.3s both;
}

.search-box {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-xl);
    padding: 8px;
    display: flex;
    align-items: center;
    gap: 0;
    transition: var(--transition-normal);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    max-width: 700px;
    margin: 0 auto;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.search-box:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(108, 99, 255, 0.1), 0 8px 32px rgba(0, 0, 0, 0.3);
}

.search-box input {
    flex: 1;
    border: none;
    background: none;
    padding: 16px 20px;
    font-size: 16px;
    font-family: var(--font-family);
    color: var(--text-main);
    outline: none;
    direction: ltr;
    text-align: left;
}

.search-box input::placeholder {
    color: var(--text-muted);
    direction: rtl;
    text-align: right;
}

.search-box .btn {
    padding: 14px 32px;
    border-radius: 20px;
    font-size: 15px;
    white-space: nowrap;
}

/* ========== TLD SELECTOR ========== */
.tld-selector {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
    animation: fadeInUp 0.6s ease-out 0.4s both;
}

.tld-chip {
    padding: 6px 16px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-fast);
    font-family: var(--font-family);
}

.tld-chip:hover,
.tld-chip.active {
    background: rgba(108, 99, 255, 0.12);
    border-color: rgba(108, 99, 255, 0.3);
    color: var(--accent-hover);
}

/* ========== RESULTS SECTION ========== */
.results-section {
    padding: 0 25px 80px;
    max-width: 900px;
    margin: 0 auto;
}

.results-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding: 0 5px;
}

.results-count {
    font-size: 14px;
    color: var(--text-muted);
    font-weight: 600;
}

/* Result Cards */
.result-card {
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius-md);
    padding: 20px 25px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: var(--transition-normal);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    animation: resultSlide 0.4s ease-out backwards;
}

.result-card:hover {
    border-color: rgba(108, 99, 255, 0.15);
    transform: translateX(-3px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

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

.result-info {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 1;
}

.result-status-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.result-status-icon.available {
    background: rgba(16, 185, 129, 0.12);
}

.result-status-icon.taken {
    background: rgba(239, 68, 68, 0.12);
}

.result-domain {
    font-size: 17px;
    font-weight: 700;
    color: white;
    direction: ltr;
    font-family: 'Courier New', monospace;
    letter-spacing: 0.3px;
}

.result-tld {
    color: var(--accent-hover);
}

.result-meta {
    display: flex;
    align-items: center;
    gap: 15px;
}

.result-status-text {
    font-size: 13px;
    font-weight: 700;
    padding: 5px 14px;
    border-radius: 20px;
}

.status-available {
    background: rgba(16, 185, 129, 0.12);
    color: #34d399;
}

.status-taken {
    background: rgba(239, 68, 68, 0.12);
    color: #f87171;
}

.status-error {
    background: rgba(245, 158, 11, 0.12);
    color: #fbbf24;
}

.result-price {
    font-size: 15px;
    font-weight: 800;
    color: var(--secondary);
    direction: ltr;
}

/* ========== LOADING ========== */
.search-loading {
    text-align: center;
    padding: 60px 20px;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(108, 99, 255, 0.1);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 20px;
}

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

.loading-text {
    color: var(--text-muted);
    font-size: 15px;
    font-weight: 600;
}

.loading-dots::after {
    content: '';
    animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
    0% { content: ''; }
    25% { content: '.'; }
    50% { content: '..'; }
    75% { content: '...'; }
}

/* ========== FEATURES SECTION ========== */
.features-section {
    padding: 80px 0;
    position: relative;
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 212, 170, 0.08);
    border: 1px solid rgba(0, 212, 170, 0.15);
    padding: 6px 18px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
    color: var(--secondary);
    margin-bottom: 15px;
}

.section-title {
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    margin-bottom: 12px;
}

.section-subtitle {
    color: var(--text-muted);
    font-size: 15px;
    max-width: 500px;
    margin: 0 auto;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

.feature-card {
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius-lg);
    padding: 35px 25px;
    text-align: center;
    transition: var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    opacity: 0;
    transition: opacity 0.4s;
}

.feature-card:hover {
    border-color: rgba(108, 99, 255, 0.2);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.feature-card:hover::before { opacity: 1; }

.feature-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin: 0 auto 20px;
    background: var(--accent-glow);
    transition: var(--transition-normal);
}

.feature-card:hover .feature-icon {
    transform: scale(1.1) rotate(-3deg);
}

.feature-title {
    font-size: 17px;
    margin-bottom: 10px;
}

.feature-desc {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.7;
}

/* ========== STATS SECTION ========== */
.stats-section {
    padding: 60px 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.stat-box {
    text-align: center;
    padding: 30px 20px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-md);
    transition: var(--transition-normal);
}

.stat-box:hover {
    border-color: rgba(108, 99, 255, 0.2);
    transform: translateY(-3px);
}

.stat-number {
    font-size: 32px;
    font-weight: 900;
    color: white;
    margin-bottom: 5px;
    background: linear-gradient(135deg, var(--accent), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    font-size: 14px;
    color: var(--text-muted);
    font-weight: 600;
}

/* ========== FOOTER ========== */
.main-footer {
    padding: 50px 0 0;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    position: relative;
    z-index: 1;
}

.footer-content {
    text-align: center;
    padding-bottom: 30px;
}

.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: 800;
    color: white;
    margin-bottom: 12px;
}

.footer-desc {
    max-width: 400px;
    margin: 0 auto;
    font-size: 14px;
    color: var(--text-muted);
}

.footer-bottom {
    padding: 20px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    text-align: center;
}

.footer-bottom p {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.25);
    margin: 0;
}

/* ========== HISTORY TABLE ========== */
.history-section {
    padding: 120px 0 80px;
}

.data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: rgba(255, 255, 255, 0.02);
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.data-table th {
    text-align: right;
    padding: 14px 18px;
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-muted);
    font-weight: 700;
    font-size: 13px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.data-table td {
    padding: 14px 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    color: var(--text-main);
    font-size: 14px;
}

.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: rgba(255, 255, 255, 0.02); }

.domain-cell {
    font-family: 'Courier New', monospace;
    font-weight: 700;
    color: white;
    direction: ltr;
}

/* ========== EMPTY STATE ========== */
.empty-state {
    text-align: center;
    padding: 80px 20px;
}

.empty-icon {
    font-size: 60px;
    margin-bottom: 15px;
    opacity: 0.4;
}

.empty-text {
    font-size: 16px;
    color: var(--text-muted);
    font-weight: 600;
}

/* ========== PAGINATION ========== */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 30px;
}

.pagination a, .pagination span {
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.02);
    color: var(--text-muted);
    font-weight: 600;
    font-size: 13px;
    transition: var(--transition-fast);
}

.pagination a:hover {
    background: rgba(108, 99, 255, 0.1);
    border-color: rgba(108, 99, 255, 0.25);
    color: white;
}

.pagination .active {
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    color: white;
    border-color: transparent;
}

/* ========== ANIMATIONS ========== */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in { animation: fadeIn 0.5s ease-out forwards; }

/* ========== FLOAT particles ========== */
.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--accent);
    opacity: 0.2;
    pointer-events: none;
    animation: float 15s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0) translateX(0); opacity: 0.2; }
    25% { transform: translateY(-100px) translateX(30px); opacity: 0.5; }
    50% { transform: translateY(-200px) translateX(-20px); opacity: 0.3; }
    75% { transform: translateY(-100px) translateX(40px); opacity: 0.4; }
}

/* ========== SCROLLBAR ========== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.08); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* Selection */
::selection { background: var(--accent); color: white; }

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
    .header-container { height: 60px; }
    .main-nav { display: none; }
    .main-nav.active {
        display: flex;
        position: absolute;
        top: 60px;
        left: 0;
        right: 0;
        background: rgba(8, 8, 13, 0.98);
        border-bottom: 1px solid rgba(255, 255, 255, 0.06);
        padding: 15px 20px;
        backdrop-filter: blur(20px);
    }
    .main-nav.active ul {
        flex-direction: column;
        width: 100%;
    }
    .main-nav.active ul li a {
        display: block;
        padding: 12px 15px;
    }
    .menu-toggle { display: flex; }
    .header-actions { display: none; }

    .hero-section { padding: 100px 20px 60px; min-height: auto; }

    .search-box {
        flex-direction: column;
        border-radius: var(--radius-lg);
        padding: 12px;
    }
    .search-box input { width: 100%; text-align: center; }
    .search-box input::placeholder { text-align: center; }
    .search-box .btn { width: 100%; border-radius: var(--radius-md); }

    .features-grid { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }

    .result-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    .result-meta {
        width: 100%;
        justify-content: space-between;
    }
}

@media (max-width: 480px) {
    .stats-grid { grid-template-columns: 1fr; }
    .hero-title { font-size: 1.6rem; }
}
