/* Style: index.styles01.css */

/* Tông màu Modern Blue Palette */
:root {
    --bg-gradient: linear-gradient(135deg, #e0eafc, #cfdef3);
    --primary-blue: #1e3c72;
    --secondary-blue: #2a5298;
    --accent-blue: #00d2ff;
    --card-bg: rgba(255, 255, 255, 0.9);
    --shadow: 0 10px 30px rgba(30, 60, 114, 0.15);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: var(--bg-gradient);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    color: #333;
}

.container {
    width: 100%;
    max-width: 480px;
    background: var(--card-bg);
    border-radius: 24px;
    box-shadow: var(--shadow);
    padding: 24px;
    text-align: center;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.4);
}

h1 {
    font-size: 1.5rem;
    color: var(--primary-blue);
    margin-bottom: 20px;
    font-weight: 700;
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

h1::before {
    content: "🐾";
    font-size: 1.3rem;
}

/* --- Khung chứa video tự co giãn theo tỷ lệ video gốc (Không cố định height) --- */
.video-wrapper {
    position: relative;
    width: 100%;
    border-radius: 16px;
    overflow: hidden;
    background: transparent; /* Bỏ màu nền để tuyệt đối sạch sẽ */
    margin-bottom: 20px;
    
    /* Không cố định chiều cao cứng, không dùng aspect-ratio cứng */
    height: auto; 
    
    /* Giới hạn chiều cao tối đa trên máy tính để tránh video quá dài */
    max-height: 60vh; 
}

video {
    width: 100%;
    height: auto; /* Để chiều cao tự động chạy theo tỷ lệ gốc của file mp4 */
    display: block;
    border-radius: 16px;
}

.button-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 14px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-refresh {
    background: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue));
    color: #fff;
    box-shadow: 0 4px 15px rgba(42, 82, 152, 0.3);
}

.btn-refresh:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(42, 82, 152, 0.4);
    background: linear-gradient(135deg, var(--secondary-blue), var(--primary-blue));
}

.btn-home {
    background: #fff;
    color: var(--primary-blue);
    border: 2px solid var(--primary-blue);
}

.btn-home:hover {
    background: #f0f4f8;
    transform: translateY(-2px);
}

.btn:active {
    transform: translateY(0);
}

.error-msg {
    color: #d32f2f;
    padding: 20px;
    font-size: 0.95rem;
    background: #ffebee;
    border-radius: 12px;
    margin-bottom: 20px;
}

.footer {
    margin-top: 15px;
    font-size: 0.8rem;
    color: #666;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    padding-top: 15px;
}

/* --- Tối ưu hóa trên thiết bị di động --- */
@media (max-width: 480px) {
    body {
        padding: 0;
        background: #fff;
    }

    .container {
        max-width: 100vw;
        min-height: 100vh;
        border-radius: 0;
        padding: 16px;
        box-shadow: none;
        border: none;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
    }

    h1 {
        margin-top: 5px;
        margin-bottom: 15px;
        font-size: 1.4rem;
    }

    .video-wrapper {
        /* Trên mobile, giới hạn chiều cao tối đa thoáng hơn để video dọc hiển thị đẹp nhất */
        max-height: 68vh; 
        margin-bottom: 15px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    video {
        /* Đảm bảo dù video gốc có độ phân giải siêu lớn thì vẫn nằm gọn trong tầm mắt */
        max-height: 68vh; 
        width: auto;
        max-width: 100%;
        border-radius: 12px;
    }
    
    .button-group {
        gap: 10px;
        margin-bottom: 10px;
    }
    
    .btn {
        padding: 12px;
        font-size: 0.95rem;
    }
    
    .footer {
        padding-top: 8px;
        margin-top: 5px;
    }
}
