/* --- CÀI ĐẶT CƠ BẢN VÀ HÌNH NỀN --- */
html {
    scroll-behavior: smooth;
}

body {
    /* Vui lòng thay link ảnh của riêng bạn vào đây */
    background-image: linear-gradient(rgba(26, 32, 44, 0.8), rgba(26, 32, 44, 0.85)), url('/images/back.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed; /* Giữ nền cố định khi cuộn */
    font-family: 'Inter', sans-serif;
    overflow: hidden; /* Chống cuộn ngang, nhưng sẽ cho phép cuộn dọc trên mobile */
}

.font-cursive {
    font-family: 'Pacifico', cursive;
}

/* --- GIAO DIỆN FORM GIẤY NOTE --- */
.note {
    background-color: #fefcbf; /* Màu giấy note vàng nhạt */
    box-shadow: 5px 5px 15px rgba(0,0,0,0.2);
    transition: all 0.3s ease-in-out;
    transform: rotate(-2deg);
}

.note:hover, .note:focus-within {
    transform: rotate(0deg) scale(1.03);
    box-shadow: 10px 10px 20px rgba(0,0,0,0.3);
}

.note textarea {
    font-family: 'Inter', sans-serif;
    font-size: 1.1rem;
    line-height: 1.6;
    color: #333;
    background-color: transparent;
    border: none;
    resize: none;
    outline: none;
    -webkit-box-shadow: none;
    -moz-box-shadow: none;
    box-shadow: none;
}

/* Cái ghim đỏ */
.pin {
    background: #ff5e5e;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    box-shadow: 0 2px 5px rgba(0,0,0,0.4);
    border: 2px solid #fff;
}

/* --- ĐỒNG HỒ --- */
#clock-container {
    position: fixed;
    bottom: 1rem;
    right: 1.5rem;
    font-size: 1.25rem; /* 20px */
    font-weight: bold;
    color: rgba(255, 255, 255, 0.7);
    background-color: rgba(0, 0, 0, 0.3);
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    z-index: 50;
    transition: opacity 0.8s, transform 0.8s;
}

/* --- HIỆU ỨNG ANIMATION --- */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94), transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.fade-in-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Hiệu ứng cho thông báo */
#notification {
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

#notification.fade-out {
    opacity: 0;
    transform: translateY(-20px);
}

/* --- PHẦN RESPONSIVE CHO THIẾT BỊ DI ĐỘNG --- */
/* Áp dụng cho màn hình có chiều rộng tối đa 640px */
@media (max-width: 640px) {
    body {
        /* Cho phép cuộn trên di động nếu nội dung dài */
        overflow-y: auto;
    }
    
    /* Căn giữa nội dung chính và cho phép cuộn */
    div.min-h-screen {
        padding-top: 6rem;
        padding-bottom: 2rem;
        align-items: flex-start;
    }

    /* Giảm padding cho header để tiết kiệm không gian */
    header#main-header {
        padding: 0.75rem 1rem;
    }

    /* Điều chỉnh form giấy note */
    .note {
        padding: 2.5rem 1.5rem 1.5rem 1.5rem;
        transform: rotate(0deg); /* Bỏ xoay trên di động cho dễ đọc */
    }

    /* Giảm kích thước chữ trong note */
    .note h2 {
        font-size: 1.75rem;
    }
    .note textarea {
        font-size: 1rem;
    }

    /* Điều chỉnh vị trí đồng hồ */
    #clock-container {
        font-size: 0.875rem;
        bottom: 0.75rem;
        right: 0.75rem;
        padding: 0.25rem 0.75rem;
    }

    /* Để footer nằm cuối nội dung thay vì cố định dưới màn hình */
    footer#main-footer {
        position: relative;
        padding: 2rem 1rem;
    }
}

