/* =========================================
   BASE & VARIABLES
========================================= */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');

:root {
    --primary-color: #ff6b6b;
    --text-main: #ffffff;
    --text-muted: #e2e8f0;
    --glass-bg: rgba(20, 25, 35, 0.75);
    --glass-border: rgba(255, 255, 255, 0.15);
    --shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
    --radius: 20px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Poppins', sans-serif;
    color: var(--text-main);
    background: url('https://images.unsplash.com/photo-1504674900247-0877df9cc836?auto=format&fit=crop&q=80&w=2070') center center/cover fixed;
    min-height: 100vh;
}

.overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1;
}

.app-wrapper {
    position: relative;
    z-index: 2;
    max-width: 650px;
    margin: 0 auto;
    padding: 12px;
    padding-bottom: 20px;
}

/* =========================================
   GLASS EFFECT
========================================= */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow);
}

/* =========================================
   HEADER
========================================= */
.app-header {
    padding: 16px 12px;
    border-radius: var(--radius);
    text-align: center;
    margin-bottom: 16px;
}

.app-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
}

.app-header p {
    font-size: 0.75rem;
    color: var(--primary-color);
    margin-top: 4px;
}

/* =========================================
   WEEK & DAY NAVIGATION (HORIZONTAL SCROLL)
========================================= */
.week-nav, .day-nav {
    border-radius: 40px;
    padding: 6px 4px;
    margin-bottom: 12px;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}

.week-list, .day-list {
    display: inline-flex;
    gap: 8px;
    padding: 4px 2px;
}

.week-item, .day-item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    border-radius: 40px;
    font-size: 0.85rem;
    font-weight: 600;
    background: rgba(0, 0, 0, 0.5);
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.day-item {
    flex-direction: column;
    padding: 6px 12px;
    gap: 4px;
}

.week-item.active, .day-item.active {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 2px 8px rgba(255,107,107,0.4);
}

.feedback-tab {
    background: rgba(255,107,107,0.3);
    border: 1px solid rgba(255,107,107,0.6);
}

.day-name {
    font-size: 0.75rem;
    font-weight: 700;
}

.day-date {
    font-size: 0.6rem;
    opacity: 0.8;
}

/* =========================================
   MENU CARDS (COMPACT)
========================================= */
.menu-view {
    display: none;
    animation: fadeIn 0.3s;
}

.menu-view.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.meal-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.meal-card {
    border-radius: 16px;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(20, 25, 35, 0.85);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.1);
    transition: transform 0.2s;
}

.meal-card:hover {
    transform: translateY(-2px);
}

.meal-icon {
    font-size: 1.6rem;
    min-width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.meal-info {
    flex: 1;
}

.meal-name {
    font-size: 0.85rem;
    font-weight: 500;
    line-height: 1.3;
    margin: 0;
    word-break: break-word;
}

/* Nutrition info */
.nutrition-info {
    font-size: 0.7rem;
    opacity: 0.8;
    margin-top: 4px;
    display: inline-block;
    margin-right: 8px;
    background: rgba(0,0,0,0.3);
    padding: 2px 6px;
    border-radius: 20px;
}

/* =========================================
   FOOTER
========================================= */
.app-footer {
    text-align: center;
    margin-top: 24px;
    font-size: 0.7rem;
    color: rgba(255,255,255,0.4);
}

/* =========================================
   FEEDBACK MODAL (RESPONSIVE)
========================================= */
.feedback-modal {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.9);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(8px);
}

.feedback-modal-content {
    width: 90%;
    max-width: 550px;
    max-height: 85vh;
    overflow-y: auto;
    background: rgba(20,25,35,0.98);
    border-radius: 28px;
    padding: 20px;
    position: relative;
    border: 1px solid rgba(255,255,255,0.2);
    animation: modalFadeIn 0.3s;
}

@keyframes modalFadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.feedback-close {
    position: absolute;
    top: 16px;
    right: 20px;
    font-size: 28px;
    cursor: pointer;
    color: #aaa;
}

.feedback-modal-content h3 {
    font-size: 1.4rem;
    color: var(--primary-color);
    margin-bottom: 8px;
    padding-right: 30px;
}

.feedback-modal-content p {
    font-size: 0.8rem;
    margin-bottom: 20px;
    opacity: 0.8;
}

/* Feedback form elements */
#feedbackForm input, #feedbackForm textarea {
    width: 100%;
    padding: 12px;
    margin-bottom: 12px;
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,0.3);
    background: rgba(0,0,0,0.5);
    color: white;
    font-size: 0.9rem;
    font-family: inherit;
}

.submit-feedback {
    background: var(--primary-color);
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 40px;
    font-weight: bold;
    color: white;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.2s;
}

.submit-feedback:hover {
    background: #ff5252;
}

.feedback-status {
    margin-top: 12px;
    text-align: center;
    font-size: 0.8rem;
}

.feedback-status.success { color: #4ade80; }
.feedback-status.error { color: #f87171; }

/* Star rating styles */
.rating-group, .category-item {
    margin-bottom: 20px;
}
.rating-group label {
    font-weight: 600;
    display: block;
    margin-bottom: 8px;
}
.star-rating {
    display: inline-flex;
    gap: 8px;
    font-size: 1.8rem;
    cursor: pointer;
    margin-bottom: 5px;
}
.star-rating span {
    transition: transform 0.1s;
}
.star-rating span:hover {
    transform: scale(1.1);
}
.small-stars {
    font-size: 1.3rem;
    gap: 5px;
}
.rating-label {
    font-size: 0.8rem;
    color: #ffaa66;
    margin-left: 5px;
}
.category-item {
    background: rgba(255,255,255,0.05);
    padding: 12px;
    border-radius: 16px;
}
.category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 8px;
}
.category-name {
    font-weight: 600;
}
.category-item textarea {
    width: 100%;
    padding: 8px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.3);
    background: rgba(0,0,0,0.5);
    color: white;
    font-size: 0.85rem;
    resize: vertical;
}
.user-info input {
    width: 100%;
    margin-bottom: 10px;
}
.feedback-weekday {
    background: rgba(255,255,255,0.1);
    padding: 8px 12px;
    border-radius: 20px;
    margin-bottom: 20px;
    font-size: 0.9rem;
    text-align: center;
}
.required {
    color: #ff6b6b;
}

/* =========================================
   EXTRA SMALL DEVICES (<=480px)
========================================= */
@media (max-width: 480px) {
    .app-wrapper {
        padding: 8px;
    }
    .week-item, .day-item {
        padding: 6px 12px;
        font-size: 0.75rem;
    }
    .meal-icon {
        font-size: 1.4rem;
        min-width: 36px;
        height: 36px;
    }
    .meal-name {
        font-size: 0.8rem;
    }
    .nutrition-info {
        font-size: 0.65rem;
        padding: 2px 5px;
    }
    .feedback-modal-content {
        padding: 16px;
    }
    .star-rating {
        font-size: 1.5rem;
        gap: 6px;
    }
    .small-stars {
        font-size: 1.1rem;
    }
}

/* =========================================
   SAFE AREA FOR NOTCHED PHONES
========================================= */
@supports (padding: max(0px)) {
    .app-wrapper {
        padding-left: max(12px, env(safe-area-inset-left));
        padding-right: max(12px, env(safe-area-inset-right));
        padding-bottom: max(20px, env(safe-area-inset-bottom));
    }
}
/* =========================================
   SIMPLIFIED BEAUTIFUL FEEDBACK MODAL
========================================= */
.feedback-modal {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.85);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(12px);
}

.feedback-modal-content {
    width: 90%;
    max-width: 500px;
    max-height: 85vh;
    overflow-y: auto;
    background: rgba(20, 25, 35, 0.98);
    border-radius: 32px;
    padding: 28px 24px;
    position: relative;
    border: 1px solid rgba(255,255,255,0.2);
    animation: modalSlideIn 0.4s cubic-bezier(0.2, 0.9, 0.4, 1.1);
}

@keyframes modalSlideIn {
    from { opacity: 0; transform: scale(0.96) translateY(-10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.feedback-close {
    position: absolute;
    top: 20px;
    right: 24px;
    font-size: 28px;
    cursor: pointer;
    color: #aaa;
    transition: color 0.2s;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.feedback-close:hover {
    color: #ff6b6b;
    background: rgba(255,255,255,0.1);
}

.modal-header {
    text-align: center;
    margin-bottom: 24px;
}

.modal-header h3 {
    font-size: 1.8rem;
    font-weight: 700;
    color: #ff6b6b;
    margin-bottom: 8px;
}

.modal-header p {
    font-size: 0.9rem;
    opacity: 0.8;
}

.feedback-weekday {
    background: rgba(255,255,255,0.08);
    padding: 10px 16px;
    border-radius: 40px;
    text-align: center;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 28px;
    color: #ffaa66;
}

/* Rating stars */
.rating-group {
    margin-bottom: 28px;
    text-align: center;
}

.rating-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 12px;
    font-size: 1rem;
}

.star-rating {
    display: flex;
    justify-content: center;
    gap: 12px;
    font-size: 2.5rem;
    cursor: pointer;
    margin-bottom: 8px;
}

.star-rating span {
    transition: transform 0.15s, color 0.1s;
    color: #ffcc00;
    text-shadow: 0 0 4px rgba(0,0,0,0.3);
}

.star-rating span:hover {
    transform: scale(1.15);
}

.rating-label {
    font-size: 0.85rem;
    color: #ffaa66;
    font-weight: 500;
}

/* Comment group */
.comment-group {
    margin-bottom: 24px;
}

.comment-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.comment-group textarea {
    width: 100%;
    padding: 12px;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.2);
    background: rgba(0,0,0,0.4);
    color: white;
    font-family: inherit;
    font-size: 0.9rem;
    resize: vertical;
    transition: border 0.2s;
}

.comment-group textarea:focus {
    outline: none;
    border-color: #ff6b6b;
}

/* User info */
.user-info {
    margin-bottom: 28px;
}

.user-info label {
    display: block;
    font-weight: 500;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.user-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.user-row input {
    flex: 1;
    padding: 10px 14px;
    border-radius: 40px;
    border: 1px solid rgba(255,255,255,0.2);
    background: rgba(0,0,0,0.4);
    color: white;
    font-size: 0.85rem;
}

.user-row input:focus {
    outline: none;
    border-color: #ff6b6b;
}

/* Submit button */
.submit-feedback {
    background: linear-gradient(135deg, #ff6b6b, #ff4757);
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 50px;
    font-weight: bold;
    font-size: 1rem;
    color: white;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 12px rgba(255,107,107,0.3);
}

.submit-feedback:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(255,107,107,0.4);
}

.feedback-status {
    margin-top: 16px;
    text-align: center;
    font-size: 0.85rem;
    font-weight: 500;
}

.feedback-status.success { color: #4ade80; }
.feedback-status.error { color: #f87171; }

/* Responsive */
@media (max-width: 480px) {
    .feedback-modal-content {
        padding: 20px 16px;
    }
    .modal-header h3 {
        font-size: 1.5rem;
    }
    .star-rating {
        gap: 8px;
        font-size: 2rem;
    }
    .user-row {
        flex-direction: column;
        gap: 8px;
    }
}
/* =========================================
   ATTRACTIVE FEEDBACK MODAL (RATINGS ONLY)
========================================= */
.feedback-modal {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.85);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(12px);
}

.feedback-modal-content {
    width: 90%;
    max-width: 550px;
    max-height: 85vh;
    overflow-y: auto;
    background: rgba(20, 25, 35, 0.98);
    border-radius: 32px;
    padding: 28px 24px;
    position: relative;
    border: 1px solid rgba(255,255,255,0.2);
    animation: modalSlideIn 0.4s cubic-bezier(0.2, 0.9, 0.4, 1.1);
}

@keyframes modalSlideIn {
    from { opacity: 0; transform: scale(0.96) translateY(-10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.feedback-close {
    position: absolute;
    top: 20px;
    right: 24px;
    font-size: 28px;
    cursor: pointer;
    color: #aaa;
    transition: all 0.2s;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.feedback-close:hover {
    color: #ff6b6b;
    background: rgba(255,255,255,0.1);
}

.modal-header {
    text-align: center;
    margin-bottom: 24px;
}

.modal-header h3 {
    font-size: 1.8rem;
    font-weight: 700;
    color: #ff6b6b;
    margin-bottom: 8px;
}

.modal-header p {
    font-size: 0.9rem;
    opacity: 0.8;
}

.feedback-weekday {
    background: rgba(255,255,255,0.08);
    padding: 10px 16px;
    border-radius: 40px;
    text-align: center;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 28px;
    color: #ffaa66;
}

/* Rating groups */
.rating-group {
    margin-bottom: 24px;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.rating-header {
    display: flex;
    align-items: baseline;
    gap: 6px;
    margin-bottom: 8px;
}

.rating-title {
    font-weight: 600;
    font-size: 1rem;
}

.required {
    color: #ff6b6b;
    font-size: 0.8rem;
}

.star-rating {
    display: flex;
    gap: 10px;
    font-size: 2rem;
    cursor: pointer;
    margin: 8px 0 4px;
}

.star-rating span {
    transition: transform 0.15s, text-shadow 0.1s;
    color: #ffcc00;
    text-shadow: 0 0 2px rgba(0,0,0,0.5);
}

.star-rating span:hover {
    transform: scale(1.15);
}

.rating-label {
    font-size: 0.8rem;
    color: #ffaa66;
    font-weight: 500;
    margin-top: 4px;
}

.category-group {
    border-bottom: none;
    margin-bottom: 16px;
    padding: 4px 0;
}

.categories-container {
    background: rgba(255,255,255,0.03);
    border-radius: 20px;
    padding: 8px 12px;
    margin-bottom: 20px;
}

/* Comment and user info */
.comment-group {
    margin-bottom: 24px;
}

.comment-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.comment-group textarea {
    width: 100%;
    padding: 12px;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.2);
    background: rgba(0,0,0,0.4);
    color: white;
    font-family: inherit;
    font-size: 0.9rem;
    resize: vertical;
    transition: border 0.2s;
}

.comment-group textarea:focus {
    outline: none;
    border-color: #ff6b6b;
}

.user-info {
    margin-bottom: 28px;
}

.user-info label {
    display: block;
    font-weight: 500;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.user-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.user-row input {
    flex: 1;
    padding: 10px 14px;
    border-radius: 40px;
    border: 1px solid rgba(255,255,255,0.2);
    background: rgba(0,0,0,0.4);
    color: white;
    font-size: 0.85rem;
}

.user-row input:focus {
    outline: none;
    border-color: #ff6b6b;
}

/* Submit button */
.submit-feedback {
    background: linear-gradient(135deg, #ff6b6b, #ff4757);
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 50px;
    font-weight: bold;
    font-size: 1rem;
    color: white;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 12px rgba(255,107,107,0.3);
}

.submit-feedback:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(255,107,107,0.4);
}

.feedback-status {
    margin-top: 16px;
    text-align: center;
    font-size: 0.85rem;
    font-weight: 500;
}

.feedback-status.success { color: #4ade80; }
.feedback-status.error { color: #f87171; }

/* Responsive */
@media (max-width: 480px) {
    .feedback-modal-content {
        padding: 20px 16px;
    }
    .modal-header h3 {
        font-size: 1.5rem;
    }
    .star-rating {
        gap: 8px;
        font-size: 1.7rem;
    }
    .user-row {
        flex-direction: column;
        gap: 8px;
    }
}
/* Updated modal header and layout */
.modal-header h3 {
    font-size: 1.6rem;
    margin-bottom: 4px;
}
.modal-header p {
    font-size: 0.85rem;
    opacity: 0.7;
    margin-bottom: 0;
}
.feedback-weekday {
    font-size: 0.9rem;
    font-weight: 500;
    background: rgba(255,255,255,0.08);
    display: inline-block;
    width: auto;
    margin: 0 auto 20px auto;
    padding: 6px 16px;
    border-radius: 40px;
    text-align: center;
}
/* Overall rating group */
.overall-group {
    text-align: center;
    margin-bottom: 24px;
}
.rating-sub {
    font-size: 0.8rem;
    opacity: 0.7;
    margin-bottom: 10px;
}
.rating-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 8px;
    font-size: 1rem;
    font-weight: 500;
}
.rating-emoji {
    font-size: 1.2rem;
}
/* Category section */
.categories-container {
    background: rgba(255,255,255,0.04);
    border-radius: 24px;
    padding: 16px;
    margin-bottom: 20px;
}
.category-title {
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 4px;
}
.category-sub {
    font-size: 0.7rem;
    opacity: 0.6;
    margin-bottom: 16px;
}
.category-group {
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.category-group:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}
.rating-label-small {
    font-size: 0.7rem;
    opacity: 0.7;
    margin-top: 4px;
    text-align: left;
}
/* Extra feedback section */
.extra-feedback {
    margin-top: 8px;
}
.extra-feedback textarea {
    width: 100%;
    padding: 10px 14px;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.2);
    background: rgba(0,0,0,0.4);
    color: white;
    font-family: inherit;
    font-size: 0.85rem;
    resize: vertical;
    margin-bottom: 12px;
}
.user-row {
    display: flex;
    gap: 10px;
}
.user-row input {
    flex: 1;
    padding: 8px 14px;
    border-radius: 40px;
    border: 1px solid rgba(255,255,255,0.2);
    background: rgba(0,0,0,0.4);
    color: white;
    font-size: 0.8rem;
}
.submit-feedback {
    margin-top: 8px;
}
