/* --- Global Styles & Background --- */
body {
    font-family: 'Poppins', sans-serif;
    margin: 0;
    padding: 39px 20px;
    color: #333;
    min-height: 100vh;

    /* --- Background Animation --- */
    background: linear-gradient(-45deg, #66a6ff, #0454ea, #b3e5fc, #66a6ff);
    background-size: 400% 400%;
    animation: gradientAnimation 20s ease infinite;
}

h2 {
    text-align: center;
    color: #00234d;
    font-weight: 600;
    margin-bottom: 30px;
}

/* --- Feedback Card Base Style (Frosted Glass) --- */
.feedback-card {
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.1);
    padding: 24px 30px;
    box-sizing: border-box;
}

/* --- Section 1: Form --- */
.feedback-form-container {
    max-width: 600px;
    margin: 0 auto 50px auto;
}

.form-card {
    text-align: center;
}

.form-card p {
    font-size: 1.1em;
    font-weight: 500;
    margin-bottom: 10px;
}

.form-card label {
    display: block;
    text-align: left;
    font-weight: 500;
    margin-top: 20px;
    margin-bottom: 8px;
}

/* --- INTERACTIVE FIRE/EMOJI RATING (Input) --- */
.star-rating-input {
    margin-bottom: 20px;
}

.star-rating-input .star {
    font-size: 3em; /* Slightly larger for Emojis */
    cursor: pointer;
    
    /* Default State: "Ash" (Gray and Faded) */
    filter: grayscale(100%) contrast(0.5);
    opacity: 0.4;
    
    transition: transform 0.2s, filter 0.2s, opacity 0.2s;
    display: inline-block; /* Needed for transform */
    padding: 0 5px; /* Spacing between fires */
}

/* Active State: "Fire" (Colorful) - Triggered by Hover or JS .filled class */
.star-rating-input .star:hover,
.star-rating-input .star.hover,
.star-rating-input .star.filled {
    filter: grayscale(0%); /* Restore original emoji color */
    opacity: 1;
    transform: scale(1.3); /* Pop effect */
    text-shadow: 0 0 15px rgba(255, 165, 0, 0.5); /* Optional Glow */
}

textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: 'Poppins', sans-serif;
    font-size: 1em;
    box-sizing: border-box;
    resize: vertical;
}

.btn-submit {
    background-color: #2979ff;
    color: white;
    font-family: 'Poppins', sans-serif;
    font-size: 1em;
    font-weight: 500;
    border: none;
    border-radius: 8px;
    padding: 12px 24px;
    cursor: pointer;
    transition: background-color 0.3s;
    margin-top: 20px;
    width: 100%;
}

.btn-submit:hover {
    background-color: #1e63d6;
}

/* --- Section 2: Display Grid --- */
.student-feedback-container {
    max-width: 1100px;
    margin: 0 auto;
}

.carousel-wrapper {
    position: relative;
}

.carousel-track-container {
    width: 100%;
}

.carousel-track {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    transition: none;
    transform: none !important; 
}

.display-card {
    min-width: 0;
    max-width: 100%;
    margin: 0;
    flex-shrink: 1;
    display: flex;
    flex-direction: column;
}

.carousel-btn {
    display: none;
}

/* --- Card Content (Display) --- */
.author-info {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.author-info img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
}

.author-details strong {
    display: block;
    font-size: 1.1em;
    font-weight: 600;
    color: #000;
}
.author-details span {
    font-size: 0.9em;
    color: #555;
}

/* --- DISPLAY FIRE RATING (Read Only) --- */
.star-rating-display {
    font-size: 1.4em;
    margin-bottom: 12px;
    letter-spacing: 2px;
}

/* Normal State for Display (Colorful Fire) */
.star-rating-display span {
    filter: grayscale(0%);
    opacity: 1;
}

/* Optional: If you want to show "Empty" fires in reviews, add class="empty" in HTML */
.star-rating-display span.empty {
    filter: grayscale(100%);
    opacity: 0.3;
}

.review-text {
    font-size: 0.95em;
    color: #333;
    line-height: 1.6;
    font-style: italic;
    margin: 0;
    flex-grow: 1; 
}

/* --- Animation Keyframes --- */
@keyframes gradientAnimation {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* --- Responsive Media Queries --- */
@media (max-width: 768px) {
    body { padding: 30px 15px; }
    h2 { font-size: 1.8em; }
    .carousel-btn { z-index: 10; }
    .carousel-btn.prev { left: 10px; }
    .carousel-btn.next { right: 10px; }
}

@media (max-width: 480px) {
    body { padding: 20px 10px; }
    h2 { font-size: 1.5em; margin-bottom: 20px; }
    .feedback-card { padding: 20px; }
    
    /* Make fire rating slightly smaller on mobile if needed */
    .star-rating-input .star { font-size: 2.2em; }

    .display-card { min-width: 300px; max-width: 300px; }
    .carousel-btn { width: 38px; height: 38px; font-size: 20px; }
    .carousel-btn.prev { left: 5px; }
    .carousel-btn.next { right: 10px; }
}

/* --- Lottie Overlay (subtle, non-blocking) --- */
.lottie-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    pointer-events: none;
    z-index: 0;
    opacity: 0.25; /* keep subtle */
}
.lottie-overlay lottie-player {
    width: 100%;
    height: 100%;
}

/* Ensure content stacks above overlay */
body > * {
    position: relative;
    z-index: 1;
}