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

:root {
    --primary-color: #279bff;
    --primary-dark: #1e40af;
    --primary-light: #3b82f6;
    --success-color: #10b981;
    --error-color: #ef4444;
    --warning-color: #f59e0b;
    --bg-color: #f9fafb;
    --card-bg: #ffffff;
    --text-primary: #111827;
    --text-secondary: #6b7280;
    --border-color: #e5e7eb;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}



/* Header */
.header {
    text-align: center;
    color: white;
    margin-bottom: 40px;
    padding-top: 40px;
}

.header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.logo-icon {
    width: 48px;
    height: 48px;
}

.subtitle {
    font-size: 1.1rem;
    opacity: 0.95;
    font-weight: 300;
}

/* Search Section */
.search-section {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 40px;
    box-shadow: var(--shadow-lg);
    margin-bottom: 30px;
}

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

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

.domain-input {
    flex: 1;
    padding: 16px 20px;
    font-size: 1rem;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    outline: none;
    transition: all 0.3s ease;
}

.domain-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.search-btn {
    padding: 16px 32px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.search-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

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

.search-btn:disabled {
    background: var(--text-secondary);
    cursor: not-allowed;
    transform: none;
}

.search-icon {
    width: 20px;
    height: 20px;
}

.error-message {
    color: var(--error-color);
    font-size: 0.9rem;
    margin-top: 8px;
    display: none;
    padding: 12px;
    background: #fee2e2;
    border-radius: 8px;
    border-left: 4px solid var(--error-color);
}

.error-message.show {
    display: block;
}

/* Examples */
.examples {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.examples-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.example-domain {
    padding: 6px 14px;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.example-domain:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Loading Spinner */
.loading-spinner {
    text-align: center;
    padding: 60px 20px;
    background: var(--card-bg);
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

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

.loading-spinner p {
    color: var(--text-secondary);
    font-size: 1rem;
}

/* Result Section */
.result-section {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 40px;
    box-shadow: var(--shadow-lg);
    animation: fadeIn 0.5s ease;
}

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

.result-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px dashed #c4c4c4;
}

.result-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-primary);
    word-break: break-word;
}

.cache-badge {
    display: inline-block;
    padding: 6px 12px;
    background: var(--warning-color);
    color: white;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}

.status-badge {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 20px;
}

.status-badge.available {
    background: #d1fae5;
    color: #065f46;
}

.status-badge.registered {
    background: #dbeafe;
    color: #279bff;
    font-size: 14px;
}

.whois-section {
    margin-bottom: 30px;
}

.section-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-icon {
    width: 24px;
    height: 24px;
    color: var(--primary-color);
}

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

.info-item {
    background: var(--bg-color);
    padding: 16px;
    border-radius: 10px;
    border-left: 4px solid var(--primary-color);
}

.info-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.info-value {
    font-size: 1rem;
    color: var(--text-primary);
    font-weight: 500;
    word-break: break-word;
}

.info-value.empty {
    color: var(--text-secondary);
    font-style: italic;
}

.privacy-notice {
    background: #fef3c7;
    border: 1px solid #fbbf24;
    padding: 12px 16px;
    border-radius: 8px;
    color: #78350f;
    font-size: 0.9rem;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.privacy-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.list-items {
    list-style: none;
    padding: 0;
}

.list-items li {
    background: var(--bg-color);
    padding: 12px 16px;
    margin-bottom: 8px;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
}

.list-items li:last-child {
    margin-bottom: 0;
}

/* Raw WHOIS */
.raw-whois-section {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 2px solid var(--border-color);
}

.toggle-raw {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    width: 100%;
    text-align: left;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.toggle-raw:hover {
    background: #279bff;
    color: white;
    border-color: #279bff;
}

.toggle-icon {
    transition: transform 0.3s ease;
    width: 20px;
    height: 20px;
}

.toggle-icon.rotated {
    transform: rotate(180deg);
}

.raw-whois-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.raw-whois-content.show {
    max-height: 1000px;
    overflow: auto;
}

.raw-whois-text {
    background: #1f2937;
    color: #f3f4f6;
    padding: 20px;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    line-height: 1.6;
    white-space: pre-wrap;
    word-wrap: break-word;
    margin-top: 12px;
    max-height: 500px;
    overflow-y: auto;
}

/* Footer */
.footer {
    text-align: center;
    color: white;
    margin-top: 40px;
    padding: 20px;
    opacity: 0.9;
}

.footer p {
    margin: 5px 0;
    font-size: 0.9rem;
}

.footer-note {
    font-size: 0.85rem;
    opacity: 0.8;
}

/* Responsive */
@media (max-width: 768px) {
    .header h1 {
        font-size: 2rem;
    }
    
    .search-section {
        padding: 24px;
    }
    
    .form-group {
        flex-direction: column;
    }
    
    .search-btn {
        width: 100%;
        justify-content: center;
    }
    
    .result-section {
        padding: 24px;
    }
    
    .result-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    body {
        padding: 10px;
    }
    
    .header {
        padding-top: 20px;
        margin-bottom: 24px;
    }
    
    .header h1 {
        font-size: 1.5rem;
        flex-direction: column;
        gap: 10px;
    }
    
    .logo-icon {
        width: 36px;
        height: 36px;
    }
    
    .subtitle {
        font-size: 1rem;
    }
}
