:root {
    /* Crimson Red Theme */
    --bg-main: #1A0A0A;
    --bg-panel: rgba(30, 15, 15, 0.7);
    --bg-input: #2B1111;
    --bg-hover: rgba(214, 48, 49, 0.15);

    --border: #4A1C1C;
    --border-highlight: #D63031;

    --primary: #D63031;
    --primary-hover: #B82424;
    --secondary: #FF7675;
    --accent: #00CEC9;
    /* Teal accent for contrast */

    --success: #00b894;
    --warning: #fdcb6e;
    --danger: #d63031;

    --text-main: #FDFBFB;
    --text-muted: #BDB4B4;

    --radius: 12px;
    --radius-sm: 8px;
    --transition: 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: 'Inter', system-ui, sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

.hidden {
    display: none !important;
}

.mt-4 {
    margin-top: 1.5rem;
}

.mt-6 {
    margin-top: 2rem;
}

.pad-0 {
    padding: 0 !important;
}

/* Background Blurs (Glassmorphism effect) */
.bg-blur {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    z-index: 0;
    pointer-events: none;
}

.blur-1 {
    top: -100px;
    right: -100px;
    width: 400px;
    height: 400px;
    background: rgba(214, 48, 49, 0.15);
}

.blur-2 {
    bottom: -150px;
    left: -100px;
    width: 500px;
    height: 500px;
    background: rgba(0, 206, 201, 0.08);
    /* Accent blur */
}

/* Layout */
.app-container {
    max-width: 960px;
    margin: 0 auto;
    padding: 3rem 1.5rem;
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

/* Hero */
.hero {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.hero .logo {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 10px 25px rgba(214, 48, 49, 0.4);
    margin-bottom: 0.5rem;
}

.hero h1 {
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.hero p {
    color: var(--text-muted);
    font-size: 1.1rem;
    max-width: 500px;
}

/* Search Section */
.search-section {
    max-width: 600px;
    margin: 0 auto;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.search-box {
    display: flex;
    gap: 1rem;
    background: var(--bg-panel);
    border: 1px solid var(--border);
    padding: 0.5rem;
    border-radius: 99px;
    backdrop-filter: blur(12px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    transition: border-color var(--transition), box-shadow var(--transition);
}

.search-box:focus-within {
    border-color: var(--primary);
    box-shadow: 0 4px 25px rgba(214, 48, 49, 0.2);
}

.input-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    padding-left: 1rem;
}

.protocol {
    color: var(--text-muted);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    user-select: none;
}

#domain-input {
    background: transparent;
    border: none;
    color: var(--text-main);
    font-size: 1.1rem;
    outline: none;
    width: 100%;
    font-family: 'JetBrains Mono', monospace;
    padding: 0 0.5rem;
}

/* Buttons */
.btn {
    padding: 0.75rem 1.75rem;
    border-radius: 99px;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    border: none;
    transition: all var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 1rem;
}

.btn.primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
}

.btn.primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 15px rgba(214, 48, 49, 0.3);
}

.error-text {
    color: var(--secondary);
    font-size: 0.85rem;
    text-align: center;
}

/* Loading State */
.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 4rem 0;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(214, 48, 49, 0.2);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Results View */
.fade-in {
    animation: fadeIn 0.4s ease forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.results-view {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Status Banner */
.status-banner {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem 2rem;
    backdrop-filter: blur(12px);
    border-left: 4px solid var(--success);
    /* Dynamic color */
}

.status-banner.valid {
    border-left-color: var(--success);
}

.status-banner.warning {
    border-left-color: var(--warning);
}

.status-banner.expired {
    border-left-color: var(--danger);
}

.status-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.valid .status-icon {
    background: rgba(0, 184, 148, 0.1);
    color: var(--success);
}

.warning .status-icon {
    background: rgba(253, 203, 110, 0.1);
    color: var(--warning);
}

.expired .status-icon {
    background: rgba(214, 48, 49, 0.1);
    color: var(--danger);
}

.status-details {
    flex: 1;
}

.status-details h2 {
    font-size: 1.5rem;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 600;
}

.status-details p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-top: 0.25rem;
}

.countdown-box {
    text-align: center;
    background: var(--bg-input);
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
}

.countdown-val {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-main);
    font-family: 'JetBrains Mono', monospace;
    line-height: 1;
}

.countdown-lbl {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.glass-panel {
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    backdrop-filter: blur(12px);
}

.full-width {
    grid-column: 1 / -1;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
}

.panel-header h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--secondary);
    letter-spacing: 0.02em;
}

.panel-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.data-group {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.data-row {
    display: flex;
    gap: 1rem;
}

.data-row .data-group {
    flex: 1;
}

.data-group label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    font-weight: 600;
}

.val {
    font-size: 0.95rem;
    color: var(--text-main);
    font-weight: 500;
}

.font-mono {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
}

.text-break {
    word-break: break-all;
}

/* Badges & Tags */
.val-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag {
    background: var(--bg-input);
    border: 1px solid var(--border);
    padding: 0.25rem 0.6rem;
    border-radius: 4px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.tag.active {
    border-color: var(--primary);
    color: var(--primary);
}

.badge-outline {
    display: inline-block;
    border: 1px solid var(--accent);
    color: var(--accent);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge {
    padding: 0.25rem 0.6rem;
    border-radius: 99px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge.accent {
    background: rgba(0, 206, 201, 0.1);
    color: var(--accent);
    border: 1px solid rgba(0, 206, 201, 0.3);
}

/* Progress Bar */
.progress-container {
    margin-top: 0.5rem;
}

.progress-bar-bg {
    width: 100%;
    height: 6px;
    background: var(--bg-input);
    border-radius: 3px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    width: 0%;
    transition: width 1s ease-out;
    border-radius: 3px;
}

.progress-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 0.5rem;
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 600;
}

/* Table */
.table-container {
    overflow-x: auto;
}

.ct-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.ct-table th {
    padding: 1rem 1.5rem;
    background: var(--bg-input);
    border-bottom: 1px solid var(--border);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    font-weight: 600;
}

.ct-table td {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border);
    font-size: 0.9rem;
}

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

.ct-table .font-mono {
    color: var(--text-muted);
}

/* Responsive */
@media (max-width: 768px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .status-banner {
        flex-direction: column;
        text-align: center;
    }
}