/* Downly24 - Premium Modern Dark Theme */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
    --bg-color: #0f172a;
    --card-bg: rgba(30, 41, 59, 0.7);
    --card-border: rgba(255, 255, 255, 0.1);
    --primary-color: #6366f1;
    --primary-hover: #4f46e5;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;

    /* Status Colors */
    --status-up: #10b981;
    --status-down: #ef4444;
    --status-error: #f59e0b;

    /* Spacing & Radius */
    --radius: 16px;
    --shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.5);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-color);
    background-image:
        radial-gradient(at 0% 0%, hsla(253, 16%, 7%, 1) 0, transparent 50%),
        radial-gradient(at 50% 0%, hsla(225, 39%, 30%, 1) 0, transparent 50%),
        radial-gradient(at 100% 0%, hsla(339, 49%, 30%, 1) 0, transparent 50%);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1.6;
    overflow-x: hidden;
}

/* --- Layout --- */
.container {
    width: 100%;
    max-width: 600px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    /* Push footer down */
}

/* --- Header --- */
header {
    margin-bottom: 3rem;
    text-align: center;
    margin-top: 4rem;
}

.logo {
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: -1px;
    background: linear-gradient(135deg, #fff 0%, #cbd5e1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
}

.tagline {
    color: var(--text-muted);
    font-size: 1.1rem;
}

/* --- Main Card (Input) --- */
.checker-card {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--card-border);
    border-radius: var(--radius);
    padding: 2rem;
    width: 100%;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease;
}

.input-group {
    position: relative;
    margin-bottom: 0;
}

input[type="url"],
input[type="text"] {
    width: 100%;
    padding: 1.25rem 1rem;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    color: #fff;
    font-size: 1.1rem;
    font-family: inherit;
    transition: all 0.3s ease;
    outline: none;
    box-shadow: inset 0 2px 4px 0 rgba(0, 0, 0, 0.06);
}

input[type="url"]:focus,
input[type="text"]:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.btn-check {
    width: 100%;
    margin-top: 1rem;
    padding: 1rem;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px -1px rgba(99, 102, 241, 0.4);
}

.btn-check:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(99, 102, 241, 0.5);
}

.btn-check:active {
    transform: translateY(0);
}

.btn-check:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* --- Result Area --- */
#result {
    margin-top: 2rem;
    width: 100%;
    /* Hidden by default handled by JS empty check or class */
    display: none;
    animation: fadeIn 0.5s ease-out;
}

/* Status Cards */
.result-card {
    background: rgba(15, 23, 42, 0.5);
    border-radius: 12px;
    padding: 1.5rem;
    border-left: 5px solid transparent;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.result-card.status-up {
    border-left-color: var(--status-up);
    background: linear-gradient(90deg, rgba(16, 185, 129, 0.1) 0%, transparent 100%);
}

.result-card.status-down {
    border-left-color: var(--status-down);
    background: linear-gradient(90deg, rgba(239, 68, 68, 0.1) 0%, transparent 100%);
}

.result-card.status-error {
    border-left-color: var(--status-error);
    background: linear-gradient(90deg, rgba(245, 158, 11, 0.1) 0%, transparent 100%);
}

.status-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.25rem;
    font-weight: 600;
}

.status-icon {
    font-size: 1.5rem;
}

.status-up .status-header {
    color: var(--status-up);
}

.status-down .status-header {
    color: var(--status-down);
}

.status-error .status-header {
    color: var(--status-error);
}

.result-details {
    display: flex;
    gap: 1.5rem;
    margin-top: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.detail-item strong {
    color: var(--text-main);
    font-weight: 500;
}

.status-message {
    margin-top: 0.5rem;
    font-size: 1rem;
    color: #e2e8f0;
}

/* --- Loading --- */
.loader {
    display: none;
    /* hidden by default */
    align-items: center;
    justify-content: center;
    margin-top: 2rem;
    gap: 0.75rem;
    color: var(--text-muted);
}

.spinner {
    width: 24px;
    height: 24px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- About Section --- */
.about-section {
    margin-top: 4rem;
    padding-top: 3rem;
    border-top: 1px solid var(--card-border);
    width: 100%;
}

.about-section h2 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: #fff;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 768px) {
    .about-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.about-item h3 {
    font-size: 1.1rem;
    color: var(--primary-color);
    margin-bottom: 0.75rem;
}

.about-item p,
.about-item ul {
    font-size: 0.95rem;
    color: var(--text-muted);
    list-style: none;
}

.about-item li {
    margin-bottom: 0.5rem;
    display: flex;
    align-items: flex-start;
}

.about-item li::before {
    content: "•";
    color: var(--primary-color);
    margin-right: 0.5rem;
}

/* --- Footer --- */
footer {
    padding: 2rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    text-align: center;
    margin-top: auto;
}

/* Mobile Adjustments */
@media (max-width: 480px) {
    .logo {
        font-size: 2rem;
    }

    .container {
        padding: 1.5rem;
    }
}