* { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Roboto', sans-serif; }
body { background-color: #f4f4f9; color: #333; }
.container { max-width: 900px; margin: 0 auto; padding: 20px; }
.card { background: white; border-radius: 10px; padding: 20px; box-shadow: 0 4px 6px rgba(0,0,0,0.1); margin-bottom: 20px; }

/* --- ADMIN PANEL --- */
.admin-panel h1 { text-align: center; margin-bottom: 20px; color: #d35400; }
.form-group { margin-bottom: 15px; }
.form-group label { display: block; margin-bottom: 5px; font-weight: bold; }
.form-group input { width: 100%; padding: 10px; border: 1px solid #ddd; border-radius: 5px; }

.btn-primary {
    background: #e67e22; color: white; padding: 12px 20px; border: none;
    border-radius: 5px; cursor: pointer; width: 100%; font-size: 16px; font-weight: bold;
    transition: background 0.3s;
}
.btn-primary:hover { background: #d35400; }

/* Bảng */
table { width: 100%; border-collapse: collapse; margin-top: 10px; background: white; }
th { background: #f8f9fa; color: #333; font-weight: bold; }
th, td { padding: 15px; border-bottom: 1px solid #eee; text-align: left; vertical-align: middle; }
.thumb { width: 60px; height: 60px; object-fit: cover; border-radius: 5px; border: 1px solid #ddd; }

/* Action Buttons */
.btn-action {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 8px 12px; margin-right: 5px; border-radius: 4px;
    text-decoration: none; color: white; font-size: 13px; border: none; cursor: pointer;
}
.btn-view { background-color: #3498db; }
.btn-view:hover { background-color: #2980b9; }
.btn-edit { background-color: #f1c40f; color: #333; }
.btn-edit:hover { background-color: #f39c12; }
.btn-delete { background-color: #e74c3c; }
.btn-delete:hover { background-color: #c0392b; }

/* --- AUTH (LOGIN/REGISTER) --- */
.auth-bg {
    background: linear-gradient(135deg, #e67e22 0%, #f1c40f 100%);
    height: 100vh; display: flex; justify-content: center; align-items: center;
}
.auth-container { width: 100%; max-width: 400px; padding: 20px; }
.auth-card { text-align: center; box-shadow: 0 10px 25px rgba(0,0,0,0.2); animation: fadeInDown 0.5s ease-out; }
.auth-card h2 { color: #d35400; margin-bottom: 5px; }
.auth-card p { color: #7f8c8d; margin-bottom: 20px; font-size: 14px; }
.error-msg { background: #ffebee; color: #c62828; padding: 10px; border-radius: 5px; margin-bottom: 15px; font-size: 14px; border: 1px solid #ef9a9a; }
.auth-link { margin-top: 15px; font-size: 14px; }
.auth-link a { color: #e67e22; text-decoration: none; font-weight: bold; }
.auth-link a:hover { text-decoration: underline; }

/* Admin Header */
.admin-navbar {
    display: flex; justify-content: space-between; align-items: center;
    background: white; padding: 10px 20px; border-radius: 8px; margin-bottom: 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}
.user-info { font-weight: bold; color: #2c3e50; }
.btn-logout {
    background: #e74c3c; color: white; text-decoration: none;
    padding: 5px 15px; border-radius: 20px; font-size: 13px; font-weight: bold; transition: 0.3s;
}
.btn-logout:hover { background: #c0392b; }

/* Thống kê Header */
.dashboard-header { display: flex; flex-direction: column; align-items: center; margin-bottom: 20px; }
.stats-summary { display: flex; gap: 20px; margin-top: 15px; flex-wrap: wrap; justify-content: center; }
.stat-box {
    background: white; padding: 15px 25px; border-radius: 8px; text-align: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05); min-width: 150px; border: 1px solid #eee;
}
.stat-box.highlight { border-bottom: 4px solid #e67e22; }
.stat-number { display: block; font-size: 28px; font-weight: bold; color: #333; }
.stat-label { font-size: 14px; color: #666; text-transform: uppercase; }
.btn-stats-page {
    display: flex; align-items: center; background: #2c3e50; color: white;
    padding: 0 20px; border-radius: 8px; text-decoration: none; font-weight: bold;
    transition: all 0.3s; box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}
.btn-stats-page:hover { background: #34495e; transform: translateY(-2px); }
.view-count-badge {
    background: #ecf0f1; color: #2c3e50; padding: 5px 10px; border-radius: 15px;
    font-weight: bold; font-size: 14px; text-decoration: none; transition: 0.2s; display: inline-block;
}
.view-count-badge:hover { background: #bdc3c7; color: #000; }

/* Stats Table */
.stats-table { width: 100%; border-collapse: collapse; }
.stats-table th { background-color: #2c3e50; color: white; padding: 10px; text-align: left; }
.stats-table td { padding: 10px; border-bottom: 1px solid #eee; }
.stats-table tr:nth-child(even) { background-color: #f9f9f9; }
.dish-tag { background: #ffeaa7; color: #d35400; padding: 2px 8px; border-radius: 4px; font-size: 13px; font-weight: bold; }
.btn-back { text-decoration: none; color: #e67e22; font-weight: bold; margin-left: auto; border: 1px solid #e67e22; padding: 8px 15px; border-radius: 5px; }
.btn-back:hover { background: #e67e22; color: white; }
.btn-reset-filter { font-size: 13px; color: #3498db; text-decoration: none; border: 1px solid #3498db; padding: 4px 10px; border-radius: 4px; }
.btn-reset-filter:hover { background: #3498db; color: white; }

/* --- MODAL --- */
.modal {
    display: none; position: fixed; z-index: 1000; left: 0; top: 0; width: 100%; height: 100%;
    background-color: rgba(0,0,0,0.8); justify-content: center; align-items: center;
}
.modal-content {
    background-color: #fefefe; padding: 25px; border-radius: 12px; text-align: center;
    width: 90%; max-width: 450px; position: relative; animation: zoomIn 0.3s;
}
.close-modal { position: absolute; top: 10px; right: 15px; color: #aaa; font-size: 28px; font-weight: bold; cursor: pointer; }
.qr-preview-area { background: #f0f0f0; padding: 20px; border-radius: 8px; margin: 15px 0; display: flex; justify-content: center; }
.qr-large { max-width: 100%; height: auto; display: block; }
.color-controls { display: flex; justify-content: center; gap: 20px; margin-bottom: 20px; }
.btn-download {
    background: #27ae60; color: white; padding: 12px 25px; text-decoration: none;
    border-radius: 30px; display: inline-block; font-weight: bold; border: none; cursor: pointer;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}
.btn-download:hover { background: #219150; transform: translateY(-2px); }

/* --- MOBILE VIEW (ĐÃ CHỈNH SỬA CHỮ NỔI BẬT) --- */
.mobile-view {
    background-image: url('https://img.freepik.com/free-photo/white-wooden-texture-flooring-background_53876-113883.jpg'); /* Nền gỗ sáng */
    background-size: cover; background-position: center;
    min-height: 100vh; display: flex; justify-content: center; align-items: center; padding: 15px;
}
.mobile-container { width: 100%; max-width: 380px; text-align: center; }

/* --- CHỮ: BẠN ĐÃ NHẬN ĐƯỢC (UPDATE) --- */
.congrats-text {
    color: #ffffff;
    font-size: 24px; /* To hơn */
    font-weight: 900; /* Rất đậm */
    text-transform: uppercase;
    margin-bottom: 20px;

    /* Tạo viền chữ (Stroke) màu cam đậm - Giúp chữ nổi trên mọi nền */
    text-shadow:
        2px 2px 0px #d35400,
        -2px -2px 0 #d35400,
        2px -2px 0 #d35400,
        -2px 2px 0 #d35400,
        2px 2px 5px rgba(0,0,0,0.5);

    letter-spacing: 1px;
    z-index: 2; position: relative;
    opacity: 0; animation: fadeInDown 0.5s forwards; animation-delay: 1s;
}

.food-image-wrapper {
    width: 280px; height: 280px; margin: 0 auto 20px; z-index: 2; position: relative;
    transform: scale(0); opacity: 0;
    animation: popOut 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards; animation-delay: 0.3s;
}
.food-img { width: 100%; height: 100%; object-fit: cover; filter: drop-shadow(0 10px 15px rgba(0,0,0,0.5)); border-radius: 10px; }
.food-badge {
    background-color: #f1c40f; color: #000; display: inline-block; padding: 10px 30px;
    border-radius: 50px; font-size: 24px; font-weight: 900; text-transform: uppercase;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3); margin-bottom: 20px; border: 3px solid #fff;
    opacity: 0; transform: translateY(20px); animation: fadeInUp 0.5s forwards; animation-delay: 1.2s;
}
.desc-box {
    background-color: rgba(12, 36, 97, 0.95); color: white; padding: 20px;
    border-radius: 15px; border: 2px solid #3498db; text-align: left;
    font-size: 15px; line-height: 1.6; box-shadow: 0 10px 20px rgba(0,0,0,0.4);
    opacity: 0; transform: translateY(50px); animation: slideUp 0.6s ease-out forwards; animation-delay: 1.5s;
    word-wrap: break-word;
}
.desc-box p { margin-bottom: 10px; }
.desc-box strong { color: #f1c40f; }
.desc-box a { color: #f1c40f; text-decoration: underline; font-weight: bold; transition: color 0.3s; }
.desc-box a:hover { color: #fff; }
.desc-box ul, .desc-box ol { margin-left: 20px; margin-bottom: 10px; }

@keyframes zoomIn { from { transform: scale(0); } to { transform: scale(1); } }
@keyframes popOut { 0% { transform: scale(0) rotate(-10deg); opacity: 0; } 100% { transform: scale(1) rotate(0deg); opacity: 1; } }
@keyframes fadeInDown { from { opacity: 0; transform: translateY(-20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideUp { from { opacity: 0; transform: translateY(100px); } to { opacity: 1; transform: translateY(0); } }
.dashboard-header {
    display: flex; flex-direction: column; align-items: center; margin-bottom: 20px;
}

.stats-summary {
    display: flex; gap: 20px; margin-top: 15px; flex-wrap: wrap; justify-content: center;
}

.stat-box {
    background: white; padding: 15px 25px; border-radius: 8px; text-align: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05); min-width: 150px; border: 1px solid #eee;
}

.stat-box.highlight { border-bottom: 4px solid #e67e22; }

.stat-number { display: block; font-size: 28px; font-weight: bold; color: #333; }
.stat-label { font-size: 14px; color: #666; text-transform: uppercase; }

.btn-stats-page {
    display: flex; align-items: center; background: #2c3e50; color: white;
    padding: 0 20px; border-radius: 8px; text-decoration: none; font-weight: bold;
    transition: all 0.3s; box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}
.btn-stats-page:hover { background: #34495e; transform: translateY(-2px); }

.view-count-badge {
    background: #ecf0f1; color: #2c3e50; padding: 5px 10px; border-radius: 15px;
    font-weight: bold; font-size: 14px; text-decoration: none; transition: 0.2s;
    display: inline-block;
}
.view-count-badge:hover { background: #bdc3c7; color: #000; }

.stats-table th { background-color: #2c3e50; color: white; }
.stats-table tr:nth-child(even) { background-color: #f9f9f9; }
.stats-table tr:hover { background-color: #f1f1f1; }

.dish-tag {
    background: #ffeaa7; color: #d35400; padding: 2px 8px;
    border-radius: 4px; font-size: 13px; font-weight: bold;
}

.btn-back {
    text-decoration: none; color: #e67e22; font-weight: bold;
    margin-left: auto; border: 1px solid #e67e22; padding: 8px 15px; border-radius: 5px;
}
.btn-back:hover { background: #e67e22; color: white; }

.btn-reset-filter {
    font-size: 13px; color: #3498db; text-decoration: none; border: 1px solid #3498db;
    padding: 4px 10px; border-radius: 4px;
}
.btn-reset-filter:hover { background: #3498db; color: white; }


.auth-bg {
    background: linear-gradient(135deg, #e67e22 0%, #f1c40f 100%);
    height: 100vh;
    display: flex; justify-content: center; align-items: center;
}

.auth-container { width: 100%; max-width: 400px; padding: 20px; }

.auth-card {
    text-align: center;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    animation: fadeInDown 0.5s ease-out;
}

.auth-card h2 { color: #d35400; margin-bottom: 5px; }
.auth-card p { color: #7f8c8d; margin-bottom: 20px; font-size: 14px; }

.error-msg {
    background: #ffebee; color: #c62828; padding: 10px;
    border-radius: 5px; margin-bottom: 15px; font-size: 14px; border: 1px solid #ef9a9a;
}

.auth-link { margin-top: 15px; font-size: 14px; }
.auth-link a { color: #e67e22; text-decoration: none; font-weight: bold; }
.auth-link a:hover { text-decoration: underline; }

/* Style cho thanh Header Admin khi đã đăng nhập */
.auth-bg {
    background: linear-gradient(135deg, #e67e22 0%, #f1c40f 100%);
    height: 100vh;
    display: flex; justify-content: center; align-items: center;
}

.auth-container { width: 100%; max-width: 400px; padding: 20px; }

.auth-card {
    text-align: center;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    animation: fadeInDown 0.5s ease-out;
}

.auth-card h2 { color: #d35400; margin-bottom: 5px; }
.auth-card p { color: #7f8c8d; margin-bottom: 20px; font-size: 14px; }

.error-msg {
    background: #ffebee; color: #c62828; padding: 10px;
    border-radius: 5px; margin-bottom: 15px; font-size: 14px; border: 1px solid #ef9a9a;
}

.auth-link { margin-top: 15px; font-size: 14px; }
.auth-link a { color: #e67e22; text-decoration: none; font-weight: bold; }
.auth-link a:hover { text-decoration: underline; }

/* Style cho thanh Header Admin khi đã đăng nhập */
.admin-navbar {
    display: flex; justify-content: space-between; align-items: center;
    background: white; padding: 10px 20px; border-radius: 8px; margin-bottom: 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}
.user-info { font-weight: bold; color: #2c3e50; }
.btn-logout {
    background: #e74c3c; color: white; text-decoration: none;
    padding: 5px 15px; border-radius: 20px; font-size: 13px; font-weight: bold;
    transition: 0.3s;
}
.btn-logout:hover { background: #c0392b; }
