/* Ultimate WHOIS Lookup - Styles */
:root {
    --primary-color: #2563eb;
    --secondary-color: #1e40af;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --dark-bg: #1e293b;
    --card-bg: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --border-color: #e2e8f0;
    --hover-bg: #f8fafc;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    padding: 20px;
}

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

/* Header */
header {
    text-align: center;
    color: white;
    margin-bottom: 40px;
    animation: fadeInDown 0.6s ease-out;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 10px;
}

.logo i {
    font-size: 48px;
    color: white;
}

header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

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

/* Search Section */
.search-section {
    background: white;
    padding: 40px;
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    margin-bottom: 30px;
    animation: fadeInUp 0.6s ease-out;
}

.search-box {
    display: flex;
    gap: 12px;
    margin-bottom: 15px;
}

#searchInput {
    flex: 1;
    padding: 16px 20px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
}

#searchInput:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

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

#searchBtn:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

#searchBtn:active {
    transform: translateY(0);
}

.quick-examples {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
    color: var(--text-secondary);
    font-size: 14px;
}

.quick-examples a {
    color: var(--primary-color);
    text-decoration: none;
    padding: 4px 12px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.quick-examples a:hover {
    background: var(--hover-bg);
    color: var(--secondary-color);
}

/* Loading Indicator */
.loading {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    animation: fadeIn 0.3s ease-out;
}

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

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

.loading p {
    color: var(--text-secondary);
    font-size: 16px;
}

/* Error Message */
.error-message {
    background: #fee2e2;
    border-left: 4px solid var(--danger-color);
    padding: 20px;
    border-radius: 8px;
    color: #991b1b;
    margin-bottom: 20px;
    animation: fadeIn 0.3s ease-out;
}

/* Results Container */
.results-container {
    display: grid;
    gap: 20px;
    animation: fadeIn 0.6s ease-out;
}

/* Result Cards */
.result-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

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

.card-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 20px 25px;
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
}

.card-header i {
    font-size: 24px;
}

.card-header h2 {
    flex: 1;
    font-size: 1.4rem;
    font-weight: 600;
}

.collapse-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.collapse-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.collapse-btn i {
    font-size: 16px;
}

.card-content {
    padding: 25px;
    max-height: 600px;
    overflow-y: auto;
}

.card-content.collapsed {
    display: none;
}

/* Summary Card */
.summary-card .card-header {
    background: linear-gradient(135deg, #10b981, #059669);
}

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

.summary-item {
    padding: 15px;
    background: var(--hover-bg);
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
}

.summary-item strong {
    display: block;
    color: var(--text-secondary);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 5px;
}

.summary-item span {
    font-size: 16px;
    color: var(--text-primary);
    word-break: break-all;
}

/* Data Tables */
.data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 15px 0;
}

.data-table th {
    background: var(--hover-bg);
    padding: 12px 15px;
    text-align: left;
    font-weight: 600;
    color: var(--text-primary);
    border-bottom: 2px solid var(--border-color);
}

.data-table td {
    padding: 12px 15px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.data-table tr:last-child td {
    border-bottom: none;
}

.data-table tr:hover {
    background: var(--hover-bg);
}

/* Info Boxes */
.info-box {
    background: #eff6ff;
    border-left: 4px solid #3b82f6;
    padding: 15px;
    border-radius: 6px;
    margin: 15px 0;
}

.success-box {
    background: #f0fdf4;
    border-left-color: var(--success-color);
}

.warning-box {
    background: #fffbeb;
    border-left-color: var(--warning-color);
}

.danger-box {
    background: #fef2f2;
    border-left-color: var(--danger-color);
}

/* Badges */
.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

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

.badge-danger {
    background: #fee2e2;
    color: #991b1b;
}

.badge-warning {
    background: #fef3c7;
    color: #92400e;
}

.badge-info {
    background: #dbeafe;
    color: #1e40af;
}

/* Code Blocks */
.code-block {
    background: #1e293b;
    color: #e2e8f0;
    padding: 20px;
    border-radius: 8px;
    overflow-x: auto;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.6;
    margin: 15px 0;
}

.code-block pre {
    margin: 0;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* DNS Records Display */
.dns-section {
    margin: 20px 0;
}

.dns-section h3 {
    color: var(--text-primary);
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--border-color);
}

.dns-record {
    padding: 10px 15px;
    background: var(--hover-bg);
    border-radius: 6px;
    margin: 8px 0;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    word-break: break-all;
}

/* SSL Certificate Display */
.cert-info {
    display: grid;
    gap: 15px;
}

.cert-field {
    padding: 12px;
    background: var(--hover-bg);
    border-radius: 6px;
    display: flex;
    justify-content: space-between;
    align-items: start;
    gap: 15px;
}

.cert-field strong {
    color: var(--text-secondary);
    min-width: 150px;
}

.cert-field span {
    flex: 1;
    text-align: right;
    word-break: break-all;
}

/* Blacklist Status */
.blacklist-results {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 12px;
    margin: 15px 0;
}

.blacklist-item {
    padding: 12px;
    border-radius: 6px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.blacklist-item.clean {
    background: #f0fdf4;
    border-left: 4px solid var(--success-color);
}

.blacklist-item.listed {
    background: #fef2f2;
    border-left: 4px solid var(--danger-color);
}

/* Footer */
footer {
    text-align: center;
    color: white;
    padding: 30px 20px;
    margin-top: 40px;
    font-size: 14px;
}

footer a {
    color: white;
    text-decoration: none;
    font-weight: 600;
    transition: opacity 0.3s ease;
}

footer a:hover {
    opacity: 0.8;
}

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

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

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

/* Responsive Design */
@media (max-width: 768px) {
    header h1 {
        font-size: 1.8rem;
    }

    .search-section {
        padding: 25px;
    }

    .search-box {
        flex-direction: column;
    }

    #searchBtn {
        width: 100%;
        justify-content: center;
    }

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

    .card-header {
        padding: 15px 20px;
    }

    .card-header h2 {
        font-size: 1.1rem;
    }

    .card-content {
        padding: 20px;
    }

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

    .blacklist-results {
        grid-template-columns: 1fr;
    }
}

/* Scrollbar Styling */
.card-content::-webkit-scrollbar {
    width: 8px;
}

.card-content::-webkit-scrollbar-track {
    background: var(--hover-bg);
    border-radius: 4px;
}

.card-content::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

.card-content::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

/* Scroll to Top/Bottom Buttons */
.scroll-btn {
    position: fixed;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    opacity: 0;
    visibility: hidden;
    z-index: 1000;
}

.scroll-btn.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-btn:hover {
    background: var(--secondary-color);
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

.scroll-btn:active {
    transform: translateY(-1px);
}

.scroll-top {
    bottom: 90px;
}

.scroll-bottom {
    bottom: 30px;
}

.scroll-btn i {
    pointer-events: none;
}

/* Responsive scroll buttons */
@media (max-width: 768px) {
    .scroll-btn {
        right: 20px;
        width: 45px;
        height: 45px;
        font-size: 18px;
    }
    
    .scroll-top {
        bottom: 80px;
    }
    
    .scroll-bottom {
        bottom: 25px;
    }
}

/* No Data Messages */
.no-data {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-secondary);
}

.no-data i {
    font-size: 48px;
    margin-bottom: 15px;
    opacity: 0.5;
}

/* Copy Button */
.copy-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s ease;
}

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

.copy-btn i {
    margin-right: 4px;
}
