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

:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --secondary: #ec4899;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --dark: #0f172a;
    --dark-light: #1e293b;
    --gray: #64748b;
    --light: #f1f5f9;
    --white: #ffffff;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--dark);
    color: var(--white);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Hero Section */
.hero-section {
    padding: 30px 0 40px;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    position: relative;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
    overflow: hidden;
}

.particles {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 1;
    background-image:
        radial-gradient(circle at 20% 50%, rgba(99, 102, 241, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(236, 72, 153, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 40% 20%, rgba(139, 92, 246, 0.1) 0%, transparent 50%);
    animation: float 20s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 0;
    margin-top: 0;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 10px;
    letter-spacing: -0.02em;
}

.gradient-text {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1rem;
    color: var(--gray);
    margin-bottom: 25px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Search Container */
.search-container {
    margin-bottom: 20px;
}

.search-box {
    display: flex;
    align-items: center;
    background: var(--dark-light);
    border: 2px solid rgba(99, 102, 241, 0.3);
    border-radius: 16px;
    padding: 8px 8px 8px 20px;
    max-width: 700px;
    margin: 0 auto 20px;
    transition: all 0.3s ease;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.search-box:focus-within {
    border-color: var(--primary);
    box-shadow: 0 10px 60px rgba(99, 102, 241, 0.4);
    transform: translateY(-2px);
}

.search-icon {
    width: 24px;
    height: 24px;
    color: var(--gray);
    margin-right: 15px;
    flex-shrink: 0;
}

#domainInput {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    font-size: 18px;
    color: var(--white);
    padding: 16px 0;
}

#domainInput::placeholder {
    color: var(--gray);
}

.search-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
    border: none;
    padding: 16px 32px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.search-btn:hover {
    transform: translateX(2px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4);
}

.search-btn svg {
    width: 20px;
    height: 20px;
}

.search-examples {
    text-align: center;
    color: var(--gray);
    font-size: 14px;
}

.search-examples span {
    margin-right: 10px;
}

.search-examples a {
    color: var(--primary-light);
    text-decoration: none;
    margin: 0 8px;
    transition: color 0.3s ease;
}

.search-examples a:hover {
    color: var(--primary);
    text-decoration: underline;
}

/* User IP Display */
.user-ip {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 15px;
    color: var(--gray);
    font-size: 14px;
}

.user-ip svg {
    width: 18px;
    height: 18px;
    color: var(--primary-light);
}

.user-ip strong {
    color: var(--primary-light);
    font-weight: 600;
}

/* Supported TLDs */
.supported-tlds {
    margin-top: 20px;
    text-align: center;
}

.supported-tlds p {
    color: var(--gray);
    margin-bottom: 10px;
    font-size: 13px;
}

.tld-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    max-width: 600px;
    margin: 0 auto;
}

.tld-badges span {
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.3);
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--primary-light);
}

.tld-badges span.more {
    background: rgba(236, 72, 153, 0.1);
    border-color: rgba(236, 72, 153, 0.3);
    color: var(--secondary);
}

/* Loading */
.loading-container {
    padding: 60px 0;
    background: var(--dark);
}

.loading-card {
    background: var(--dark-light);
    border-radius: 20px;
    padding: 60px 40px;
    text-align: center;
    border: 1px solid rgba(99, 102, 241, 0.2);
}

.loader {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 30px;
}

.loader-circle {
    width: 16px;
    height: 16px;
    background: var(--primary);
    border-radius: 50%;
    animation: bounce 1.4s ease-in-out infinite;
}

.loader-circle:nth-child(1) {
    animation-delay: -0.32s;
}

.loader-circle:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes bounce {
    0%, 80%, 100% {
        transform: scale(0);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

.loading-text {
    font-size: 18px;
    color: var(--gray);
}

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

@keyframes dots {
    0%, 20% { content: ''; }
    40% { content: '.'; }
    60% { content: '..'; }
    80%, 100% { content: '...'; }
}

/* Error */
.error-container {
    padding: 60px 0;
    background: var(--dark);
}

.error-card {
    background: var(--dark-light);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 20px;
    padding: 60px 40px;
    text-align: center;
}

.error-icon {
    width: 64px;
    height: 64px;
    color: var(--danger);
    margin: 0 auto 20px;
}

.error-card h3 {
    font-size: 24px;
    margin-bottom: 10px;
}

.error-card p {
    color: var(--gray);
    margin-bottom: 30px;
}

.retry-btn {
    background: var(--danger);
    color: var(--white);
    border: none;
    padding: 12px 30px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.retry-btn:hover {
    background: #dc2626;
    transform: translateY(-2px);
}

/* Results */
.results-section {
    padding: 60px 0 100px;
    background: var(--dark);
    min-height: 100vh;
}

.domain-header {
    text-align: center;
    margin-bottom: 50px;
    padding: 40px;
    background: var(--dark-light);
    border-radius: 20px;
    border: 1px solid rgba(99, 102, 241, 0.2);
}

.domain-status {
    margin-bottom: 20px;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 14px;
}

.status-badge.available {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.status-badge.registered {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary-light);
    border: 1px solid rgba(99, 102, 241, 0.3);
}

.status-badge::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
}

.domain-name {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    word-break: break-all;
}

.whois-server {
    color: var(--gray);
    font-size: 14px;
}

.whois-server span {
    color: var(--primary-light);
    font-weight: 600;
}

/* Data Table */
.data-grid {
    background: var(--dark-light);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 40px;
}

.whois-table {
    width: 100%;
    border-collapse: collapse;
}

.whois-table thead {
    background: rgba(99, 102, 241, 0.1);
}

.whois-table th {
    padding: 16px 24px;
    text-align: left;
    color: var(--primary-light);
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid rgba(99, 102, 241, 0.3);
}

.whois-table tbody tr {
    border-bottom: 1px solid rgba(99, 102, 241, 0.1);
    transition: background 0.2s ease;
}

.whois-table tbody tr:hover {
    background: rgba(99, 102, 241, 0.05);
}

.whois-table tbody tr:last-child {
    border-bottom: none;
}

.whois-table tbody tr.highlight-row {
    background: rgba(99, 102, 241, 0.08);
    border-left: 4px solid var(--primary);
}

.whois-table tbody tr.highlight-row:hover {
    background: rgba(99, 102, 241, 0.12);
}

.whois-table tbody tr.highlight-row td:first-child {
    color: var(--primary-light);
    font-weight: 700;
}

.whois-table td {
    padding: 16px 24px;
    vertical-align: top;
}

.whois-table td:first-child {
    color: var(--gray);
    font-weight: 600;
    width: 250px;
}

.whois-table td:last-child {
    color: var(--white);
    word-break: break-word;
}

.whois-table .value-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.whois-table .value-list li {
    padding: 4px 0;
    color: var(--white);
}

/* Available Domain Message */
.available-message {
    text-align: center;
    padding: 60px 40px;
    background: rgba(16, 185, 129, 0.05);
    border: 2px solid rgba(16, 185, 129, 0.3);
    border-radius: 16px;
    margin-bottom: 30px;
}

.available-message svg {
    width: 80px;
    height: 80px;
    color: var(--success);
    margin: 0 auto 20px;
    display: block;
}

.available-message h3 {
    font-size: 1.8rem;
    color: var(--success);
    margin-bottom: 15px;
}

.available-message p {
    font-size: 1.1rem;
    color: var(--gray);
}

.available-message p strong {
    color: var(--white);
    font-weight: 600;
}

/* Raw Data */
.raw-data-section {
    margin-top: 40px;
}

.toggle-raw-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--dark-light);
    border: 1px solid rgba(99, 102, 241, 0.3);
    color: var(--white);
    padding: 14px 24px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 0 auto 20px;
}

.toggle-raw-btn:hover {
    background: rgba(99, 102, 241, 0.1);
    border-color: var(--primary);
}

.toggle-raw-btn svg {
    width: 20px;
    height: 20px;
}

.raw-data-container {
    background: #0d1117;
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 12px;
    padding: 24px;
    overflow-x: auto;
}

#rawData {
    color: #c9d1d9;
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 13px;
    line-height: 1.6;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* New Search */
.new-search-container {
    text-align: center;
    margin-top: 60px;
}

.new-search-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: var(--white);
    border: none;
    padding: 16px 32px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.new-search-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 40px rgba(99, 102, 241, 0.4);
}

.new-search-btn svg {
    width: 20px;
    height: 20px;
}

/* Footer */
.footer {
    background: var(--dark-light);
    padding: 40px 0;
    text-align: center;
    border-top: 1px solid rgba(99, 102, 241, 0.1);
}

.footer p {
    color: var(--gray);
    margin-bottom: 10px;
}

.footer-note {
    font-size: 14px;
}

/* Responsive */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .search-box {
        flex-direction: column;
        padding: 16px;
    }

    .search-icon {
        display: none;
    }

    #domainInput {
        text-align: center;
        padding: 12px;
    }

    .search-btn {
        width: 100%;
        justify-content: center;
    }

    .whois-table {
        font-size: 14px;
    }

    .whois-table th,
    .whois-table td {
        padding: 12px 16px;
    }

    .whois-table td:first-child {
        width: auto;
        display: block;
        padding-bottom: 4px;
        border-bottom: none;
    }

    .whois-table td:last-child {
        display: block;
        padding-top: 0;
    }

    .whois-table tbody tr {
        display: block;
        margin-bottom: 16px;
        border: 1px solid rgba(99, 102, 241, 0.1);
        border-radius: 8px;
        padding: 12px;
    }

    .domain-name {
        font-size: 1.75rem;
    }

    .tld-badges {
        gap: 8px;
    }

    .tld-badges span {
        padding: 6px 12px;
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }

    .domain-header {
        padding: 24px 16px;
    }
}
