/* ============================================================
   HTTP Headers Checker – Professional Glassmorphism Card UI
   ============================================================ */
:root {
    --hhc-bg: #f4f6f9;
    --hhc-card-bg: rgba(255,255,255,0.7);
    --hhc-glass-bg: rgba(255,255,255,0.5);
    --hhc-text: #1a1a2e;
    --hhc-text-secondary: #4a4a6a;
    --hhc-border: #e2e8f0;
    --hhc-shadow: 0 8px 24px rgba(0,0,0,0.06);
    --hhc-red: #db0601;
    --hhc-green: #10b981;
    --hhc-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --hhc-font: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

@media (prefers-color-scheme: dark) {
    :root {
        --hhc-bg: #0f1117;
        --hhc-card-bg: rgba(28, 30, 38, 0.8);
        --hhc-glass-bg: rgba(28, 30, 38, 0.5);
        --hhc-text: #e4e6f0;
        --hhc-text-secondary: #a0a4b8;
        --hhc-border: #2e3140;
        --hhc-shadow: 0 8px 24px rgba(0,0,0,0.4);
    }
}

* {
    box-sizing: border-box;
}

.hhc-tool-container {
    width: 100%;
    max-width: 1200px;
    margin: 30px auto;
    padding: 0 20px;
    font-family: var(--hhc-font);
    color: var(--hhc-text);
    background: transparent;
}

.hhc-glass {
    background: var(--hhc-glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--hhc-border);
    border-radius: 16px;
    box-shadow: var(--hhc-shadow);
    transition: all 0.3s;
}

.hhc-card {
    padding: 24px;
    margin-bottom: 20px;
    background: var(--hhc-card-bg);
    border-radius: 16px;
    box-shadow: var(--hhc-shadow);
    border: 1px solid var(--hhc-border);
}

.hhc-card-header {
    text-align: center;
    margin-bottom: 20px;
}

.hhc-card-header h2 {
    font-size: 2rem;
    font-weight: 700;
    background: var(--hhc-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0 0 8px;
}

.hhc-card-header p {
    color: var(--hhc-text-secondary);
    margin: 0;
}

.hhc-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.hhc-input-group {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.hhc-url-input {
    flex: 1 1 300px;
    padding: 14px 18px;
    border-radius: 12px;
    border: 1px solid var(--hhc-border);
    background: var(--hhc-bg);
    color: var(--hhc-text);
    font-size: 1rem;
    outline: none;
    transition: border 0.3s, box-shadow 0.3s;
}

.hhc-url-input:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102,126,234,0.2);
}

.hhc-red-btn {
    display: inline-block;
    background: var(--hhc-red);
    color: #fff;
    font-weight: 700;
    font-size: 1rem;
    text-align: center;
    padding: 14px 24px;
    border-radius: 12px;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    letter-spacing: 0.3px;
}

.hhc-red-btn:hover {
    background: #b80501;
    transform: scale(1.02);
}

.hhc-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.hhc-error-msg {
    color: var(--hhc-red);
    font-weight: 600;
    margin-top: 8px;
    padding: 8px 12px;
    background: rgba(219,6,1,0.1);
    border-radius: 8px;
    border-left: 4px solid var(--hhc-red);
}

/* Results */
.hhc-results-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.hhc-card-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0 0 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--hhc-border);
}

.hhc-clean-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.hhc-clean-list > div {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 8px 0;
    border-bottom: 1px solid var(--hhc-border);
}

.hhc-clean-list > div:last-child {
    border-bottom: none;
}

.hhc-label {
    font-weight: 600;
    color: var(--hhc-text);
    font-size: 0.95rem;
    flex: 0 0 40%;
    max-width: 40%;
}

.hhc-value {
    color: var(--hhc-text-secondary);
    font-weight: 500;
    text-align: right;
    word-break: break-word;
    flex: 1;
    font-size: 0.95rem;
}

.hhc-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
}

.hhc-badge-present {
    background: rgba(16,185,129,0.15);
    color: var(--hhc-green);
}

.hhc-badge-missing {
    background: rgba(219,6,1,0.15);
    color: var(--hhc-red);
}

.hhc-redirect-chain {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.hhc-redirect-step {
    background: var(--hhc-glass-bg);
    padding: 8px 14px;
    border-radius: 8px;
    font-family: monospace;
    font-size: 0.9rem;
    backdrop-filter: blur(8px);
}

.hhc-arrow {
    color: var(--hhc-text-secondary);
    font-size: 1.2rem;
}

.hhc-raw-headers {
    background: var(--hhc-bg);
    border: 1px solid var(--hhc-border);
    border-radius: 8px;
    padding: 12px;
    font-family: monospace;
    font-size: 0.9rem;
    white-space: pre-wrap;
    word-break: break-all;
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 12px;
}

.hhc-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.hhc-icon-btn {
    background: rgba(128,128,128,0.1);
    border: 1px solid var(--hhc-border);
    border-radius: 10px;
    padding: 8px 12px;
    color: var(--hhc-text);
    cursor: pointer;
    font-size: 0.9rem;
    transition: background 0.2s, transform 0.1s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.hhc-icon-btn:hover {
    background: rgba(128,128,128,0.25);
    transform: translateY(-1px);
}

/* Responsive */
@media (max-width: 900px) {
    .hhc-card {
        padding: 20px;
    }
}

@media (max-width: 600px) {
    .hhc-tool-container {
        margin: 15px auto;
        padding: 0 12px;
    }
    .hhc-card {
        padding: 18px;
    }
    .hhc-card-header h2 {
        font-size: 1.6rem;
    }
    .hhc-url-input {
        width: 100%;
    }
    .hhc-red-btn {
        width: 100%;
        padding: 14px;
    }
    .hhc-label {
        font-size: 0.85rem;
        flex: 0 0 45%;
        max-width: 45%;
    }
    .hhc-value {
        font-size: 0.85rem;
    }
}

/* Animations */
.hhc-card, .hhc-glass {
    animation: hhcFadeUp 0.4s ease forwards;
}
@keyframes hhcFadeUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}