@import url('https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap');

:root {
    --primary-color: #6366f1;
    --secondary-color: #a855f7;
    --accent-color: #ec4899;
    --bg-dark: #0f172a;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
}

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

body {
    font-family: 'Inter', sans-serif;
    /* background: linear-gradient(rgba(15, 23, 42, 0.7), rgba(15, 23, 42, 0.7)),
        url('https://images.unsplash.com/photo-1555921015-5532091f6026?q=80&w=2070&auto=format&fit=crop'); */
    background: linear-gradient(rgba(15, 23, 42, 1.0), rgba(15, 23, 42, 1.0));
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Background Animation */
.background-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    filter: blur(80px);
}

.circle {
    position: absolute;
    border-radius: 50%;
    opacity: 0.5;
}

.circle-1 {
    width: 400px;
    height: 400px;
    background: var(--primary-color);
    top: -100px;
    left: -100px;
    animation: move 15s infinite alternate;
}

.circle-2 {
    width: 350px;
    height: 350px;
    background: var(--secondary-color);
    bottom: -100px;
    right: -100px;
    animation: move 20s infinite alternate-reverse;
}

.circle-3 {
    width: 300px;
    height: 300px;
    background: var(--accent-color);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: float 10s infinite ease-in-out;
}

@keyframes move {
    from {
        transform: translate(0, 0);
    }

    to {
        transform: translate(100px, 100px);
    }
}

@keyframes float {

    0%,
    100% {
        transform: translate(-50%, -55%);
    }

    50% {
        transform: translate(-50%, -45%);
    }
}

/* Container */
.container {
    max-width: 1000px;
    width: 90%;
    padding: 2rem 0;
    text-align: center;
    z-index: 1;
}

/* Header */
.header {
    margin-bottom: 4rem;
}

.logo-wrapper {
    width: 80px;
    height: 80px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto 2rem;
    backdrop-filter: blur(10px);
}

.logo-wrapper i {
    width: 40px;
    height: 40px;
    color: var(--primary-color);
}

.icon-spin {
    animation: spin 8s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.title {
    font-size: clamp(2.5rem, 8vw, 4rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.title span {
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.subtitle {
    font-size: 1.1rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 4rem;
}

/* Glass Card */
.glass-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(15px);
    border-radius: 24px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.glass-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.card-header i {
    width: 18px;
    height: 18px;
}

.card-body {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Time Styles */
.time-display {
    font-size: 3rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    font-variant-numeric: tabular-nums;
}

.date-display {
    color: var(--text-muted);
    font-size: 1rem;
}

/* Weather Styles */
.weather-main {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.temp-display {
    font-size: 3rem;
    font-weight: 600;
}

.weather-desc {
    margin: 0.5rem 0;
    font-weight: 300;
    color: var(--text-muted);
}

.weather-details {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 1rem;
    font-size: 0.9rem;
}

.mini-icon {
    width: 14px;
    height: 14px;
    vertical-align: middle;
    margin-right: 4px;
    color: var(--primary-color);
}

/* News List Styles */
.news-list {
    list-style: none;
    text-align: left;
    max-height: 220px;
    overflow-y: auto;
    padding-right: 8px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Tùy chỉnh thanh cuộn cho news list */
.news-list::-webkit-scrollbar {
    width: 4px;
}

.news-list::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

.news-list::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 10px;
}

.news-item {
    padding-bottom: 8px;
    border-bottom: 1px solid var(--glass-border);
}

.news-item:last-child {
    border-bottom: none;
}

.news-link {
    text-decoration: none;
    color: var(--text-main);
    display: flex;
    flex-direction: column;
    gap: 4px;
    transition: all 0.2s ease;
}

.news-link:hover {
    color: var(--primary-color);
    transform: translateX(4px);
}

.news-title {
    font-size: 0.9rem;
    font-weight: 500;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-date {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.news-loading {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-style: italic;
    text-align: center;
    padding: 1rem 0;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    margin-top: 1rem;
    overflow: hidden;
}

.progress-fill {
    width: 65%;
    height: 100%;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    border-radius: 10px;
    animation: progressPulse 2s infinite ease-in-out;
}

@keyframes progressPulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.6;
    }
}

/* Footer */
.footer {
    border-top: 1px solid var(--glass-border);
    padding-top: 2rem;
}

.footer p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
}

.social-links a {
    color: var(--text-muted);
    transition: color 0.3s ease;
}

.social-links a:hover {
    color: var(--text-main);
}

/* Responsive */
@media (max-width: 640px) {
    .container {
        padding: 1rem;
    }

    .header {
        margin-bottom: 2.5rem;
    }
}