/* ==================== KHAI BÁO FONT & BIẾN CƠ BẢN ==================== */
@font-face {
    font-family: 'Minecraft VN';
    src: url('minecraft-vi.ttf') format('truetype');
    font-weight: normal;
    font-display: swap;
}

:root {
    /* Tông màu Rừng Sâu và Ánh Nắng (Cực kỳ thư giãn) */
    --bg-forest: #0f172a; /* Xanh dương đen sâu thẳm, dịu mắt */
    --glass-bg: rgba(255, 255, 255, 0.04); /* Kính mờ siêu trong */
    --glass-border: rgba(255, 255, 255, 0.08);
    
    /* Màu nhấn */
    --sage-green: #86efac; /* Xanh lá mạ mềm mại */
    --warm-sun: #fde047; /* Vàng nắng nhạt */
    
    /* Chữ */
    --text-main: #f8fafc;
    --text-muted: #cbd5e1;
    
    /* Fonts: Quicksand cho sự tròn trịa thân thiện, Minecraft cho điểm nhấn */
    --font-ui: 'Quicksand', sans-serif;
    --font-mc: 'Minecraft VN', monospace; 
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    background-color: var(--bg-forest);
    color: var(--text-main);
    font-family: var(--font-ui);
    line-height: 1.7;
    min-height: 100vh;
    overflow-x: hidden;
    /* Font mịn màng, dễ nhìn */
    -webkit-font-smoothing: antialiased;
}

/* Ánh sáng ấm áp từ góc màn hình tỏa ra như bình minh */
.forest-ambient {
    position: fixed;
    top: -20vh; right: -10vw; 
    width: 70vw; height: 70vh;
    background: radial-gradient(circle, rgba(253, 224, 71, 0.15) 0%, rgba(134, 239, 172, 0.05) 40%, transparent 70%);
    z-index: -1;
    pointer-events: none;
    filter: blur(60px);
}

/* Hạt bụi nắng lơ lửng */
.sun-mote {
    position: fixed;
    background: #fef08a;
    border-radius: 50%;
    filter: blur(1px);
    opacity: 0;
    pointer-events: none;
    z-index: 0;
    animation: drift linear infinite alternate;
}

@keyframes drift {
    0% { transform: translateY(0) translateX(0); opacity: 0; }
    30% { opacity: 0.4; }
    70% { opacity: 0.4; }
    100% { transform: translateY(-100px) translateX(50px); opacity: 0; }
}

/* ==================== LÁ CÂY RƠI MINECRAFT STYLE ==================== */
@keyframes fallingLeaf {
    0% {
        transform: translateY(-10vh) translateX(0) rotate(0deg);
        opacity: 0;
    }
    5% {
        opacity: 1;
    }
    95% {
        opacity: 1;
    }
    100% {
        transform: translateY(110vh) translateX(var(--wind-drift)) rotate(calc(360deg * var(--rotation-speed)));
        opacity: 0;
    }
}

.falling-leaf {
    position: fixed;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    animation: fallingLeaf linear infinite;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
    text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.2);
}

.mc-font { font-family: var(--font-mc); letter-spacing: 1px; }
.text-warm { color: var(--warm-sun); }

/* ==================== THANH ĐIỀU HƯỚNG MỀM MẠI ==================== */
.cozy-nav {
    position: fixed;
    top: 30px; left: 50%;
    transform: translateX(-50%);
    width: 90%; max-width: 850px;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 100px; /* Tròn xoe viên thuốc */
    padding: 12px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.cozy-nav .brand {
    font-family: var(--font-mc);
    font-size: 1.5rem;
    color: var(--warm-sun);
    text-decoration: none;
    font-weight: bold;
    letter-spacing: 1px;
    text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.5);
}

.nav-menu { display: flex; gap: 25px; align-items: center; }
.nav-link { 
    color: var(--text-muted); 
    text-decoration: none; 
    font-weight: 600; 
    font-size: 1.1rem;
    transition: all 0.3s ease; 
    position: relative;
}
.nav-link:hover { 
    color: #fff; 
    text-shadow: 0 0 10px rgba(255,255,255,0.3); 
}
.nav-link:focus-visible {
    outline: 2px solid var(--sage-green);
    outline-offset: 4px;
    border-radius: 4px;
}

/* Nút bấm chill */
.btn-cozy {
    background: var(--sage-green);
    color: #064e3b;
    padding: 10px 24px;
    border: none;
    border-radius: 100px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.05rem;
    font-family: var(--font-ui);
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 15px rgba(134, 239, 172, 0.2);
    display: inline-block;
}
.btn-cozy:hover { 
    background: #a7f3d0; 
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(134, 239, 172, 0.4); 
}
.btn-cozy:active {
    transform: translateY(-1px);
}
.btn-cozy:focus-visible {
    outline: 2px solid #064e3b;
    outline-offset: 2px;
}
.btn-outline {
    background: transparent;
    border: 2px solid var(--text-muted);
    color: var(--text-main);
    box-shadow: none;
}
.btn-outline:hover { 
    background: rgba(255,255,255,0.1); 
    border-color: #fff; 
    transform: translateY(-3px);
}

/* ==================== KHU VỰC HERO THƯ GIÃN ==================== */
.container {
    max-width: 950px;
    margin: 0 auto;
    padding: 160px 20px 60px 20px; 
    position: relative;
    z-index: 10;
}

.hero-section {
    text-align: center;
    margin-bottom: 70px;
}

.badge-chill {
    display: inline-block;
    background: rgba(255, 255, 255, 0.05);
    color: var(--sage-green);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 8px 24px;
    border-radius: 100px;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 25px;
    backdrop-filter: blur(10px);
}

.hero-title {
    font-family: var(--font-mc);
    font-size: 4rem;
    letter-spacing: 4px;
    margin-bottom: 25px;
    color: #ffffff;
    /* Đổ bóng chữ phẳng, mềm mại, dễ nhìn */
    text-shadow: 3px 3px 0 rgba(0,0,0,0.3);
}

.hero-desc {
    color: var(--text-muted);
    font-size: 1.25rem;
    font-weight: 500;
    max-width: 650px;
    margin: 0 auto;
}

/* ==================== LƯỚI BENTO MỀM MẠI ==================== */
.chill-bento-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

.cozy-card {
    background: var(--glass-bg);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid var(--glass-border);
    border-radius: 32px; /* Bo góc cực tròn trịa */
    padding: 35px;
    transition: all 0.5s ease;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15); /* Bóng mềm, lan rộng */
}

.cozy-card:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-5px);
    box-shadow: 0 20px 50px rgba(0,0,0,0.25);
    border-color: rgba(255,255,255,0.2);
}

.card-wide { grid-column: span 3; }

.ranking-card {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.08) 0%, rgba(59, 130, 246, 0.06) 100%);
    border: 1px solid rgba(168, 85, 247, 0.15);
}

.ranking-card:hover {
    border-color: rgba(168, 85, 247, 0.3);
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.12) 0%, rgba(59, 130, 246, 0.10) 100%);
}

.cozy-card h3 {
    font-size: 2rem;
    margin-bottom: 15px;
    color: #fff;
    text-shadow: 1px 1px 0 rgba(0,0,0,0.4);
}

.cozy-card p {
    color: var(--text-muted);
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 30px;
    flex-grow: 1;
}

.card-icon {
    font-size: 3rem;
    margin-bottom: 15px;
    filter: drop-shadow(0 4px 10px rgba(0,0,0,0.2));
}

/* ==================== TRẠNG THÁI SERVER ẤM ÁP ==================== */
.server-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 15px;
    background: linear-gradient(135deg, rgba(255,255,255,0.06), rgba(255,255,255,0.01));
}

.server-card h3 {
    margin: 0 !important;
}

.status-box {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(0,0,0,0.2);
    padding: 8px 20px;
    border-radius: 100px;
    margin-top: 10px;
}

.pulse-dot {
    width: 12px; height: 12px;
    border-radius: 50%;
    background: #64748b; 
}
.pulse-dot.online { background: var(--sage-green); box-shadow: 0 0 12px var(--sage-green); animation: softPulse 3s infinite; }
.pulse-dot.offline { background: #f87171; box-shadow: 0 0 12px #f87171; }

@keyframes softPulse {
    0% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.3); opacity: 1; }
    100% { transform: scale(1); opacity: 0.8; }
}

#server-status { font-size: 1.15rem; color: #fff; font-weight: 500;}

.ip-container {
    display: flex;
    align-items: center;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 20px;
    padding: 6px 6px 6px 24px;
    transition: 0.3s;
}
.ip-container:hover { background: rgba(255,255,255,0.1); }

.ip-text {
    font-family: var(--font-mc);
    font-size: 1.25rem;
    color: var(--sage-green);
    margin-right: 25px;
    letter-spacing: 1px;
}

.btn-copy {
    background: #fff;
    border: none;
    color: #0f172a;
    padding: 12px 24px;
    border-radius: 16px;
    cursor: pointer;
    font-weight: 700;
    font-family: var(--font-ui);
    font-size: 1.05rem;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.1);
}
.btn-copy:hover { 
    background: var(--sage-green); 
    transform: scale(1.08);
    box-shadow: 0 6px 20px rgba(134, 239, 172, 0.3);
}
.btn-copy:active {
    transform: scale(0.98);
}
.btn-copy:focus-visible {
    outline: 2px solid var(--sage-green);
    outline-offset: 2px;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 850px) {
    .chill-bento-grid { grid-template-columns: repeat(2, 1fr); }
    .server-card { grid-column: span 2; }
    .ranking-card { grid-column: span 2; }
}

@media (max-width: 650px) {
    .chill-bento-grid { grid-template-columns: 1fr; }
    .server-card { grid-column: span 1; flex-direction: column; align-items: center; gap: 15px; }
    .ranking-card { grid-column: span 1; }
    .ranking-card h3 { font-size: 1.5rem; }
    .ranking-card > div { flex-direction: column; align-items: flex-start !important; }
    .ranking-card .card-icon { font-size: 2.5rem; }
    .hero-title { font-size: 2.8rem; }
    .ip-container { width: 100%; justify-content: space-between; padding-left: 15px;}
    .cozy-nav { width: 95%; padding: 12px 20px; }
    .nav-menu a.nav-link { display: none; } /* Ẩn bớt link text trên đt */
}

/* ==================== FOOTER STYLING ==================== */
.site-footer {
    background: rgba(15, 23, 42, 0.95);
    border-top: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
    padding: 40px 20px;
    margin-top: 100px;
    text-align: center;
}

.footer-content {
    max-width: 950px;
    margin: 0 auto;
}

.site-footer p {
    color: var(--text-muted);
    font-size: 1rem;
    margin-bottom: 12px;
    font-weight: 500;
}

.footer-contact {
    color: var(--text-main);
    font-weight: 600;
}

/* Scroll smooth behavior */
html {
    scroll-behavior: smooth;
}

/* Selection styling */
::selection {
    background: var(--sage-green);
    color: #064e3b;
}

/* Link styling improvements */
a { color: inherit; }
a:focus-visible { outline: 2px solid var(--sage-green); outline-offset: 2px; }

/* ==================== UNIFIED PAGE STYLING ==================== */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

.glass-panel h2 {
    color: #fff;
    margin-bottom: 1.5rem;
}

.text-gradient {
    background: linear-gradient(135deg, var(--sage-green), var(--warm-sun));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
}

.input-group {
    margin-bottom: 1.5rem;
}

.input-group input {
    width: 100%;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: var(--text-main);
    font-family: var(--font-ui);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.input-group input:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--sage-green);
    box-shadow: 0 0 12px rgba(134, 239, 172, 0.2);
}

.input-group input::placeholder {
    color: var(--text-muted);
}

.btn {
    background: var(--sage-green);
    color: #064e3b;
    padding: 12px 28px;
    border: none;
    border-radius: 10px;
    font-weight: 700;
    font-size: 1rem;
    font-family: var(--font-ui);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 15px rgba(134, 239, 172, 0.2);
    display: inline-block;
    text-decoration: none;
}

.btn:hover {
    background: #a7f3d0;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(134, 239, 172, 0.3);
}

.btn:active {
    transform: translateY(0);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--text-muted);
    color: var(--text-main);
    box-shadow: none;
    padding: 10px 24px;
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: #fff;
    transform: translateY(-2px);
}

/* Header styling */
.site-header {
    background: var(--glass-bg);
    border-bottom: 1px solid var(--glass-border);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.header-inner {
    max-width: 950px;
    margin: 0 auto;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand {
    font-family: var(--font-mc);
    font-size: 1.5rem;
    color: var(--warm-sun);
    text-decoration: none;
    font-weight: bold;
    letter-spacing: 1px;
    text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.4);
}

.prime-logo {
    background: linear-gradient(135deg, var(--warm-sun), var(--sage-green));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-links {
    display: flex;
    gap: 20px;
    align-items: center;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.nav-links a:hover {
    color: #fff;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

/* Responsive */
@media (max-width: 650px) {
    .header-inner {
        flex-direction: column;
        gap: 15px;
    }
    
    .input-group input {
        font-size: 16px;
    }
}