/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Audiowide', cursive;
    line-height: 1.6;
    color: #333;
    overflow-x: hidden;
}

/* Background handled globally in bg-layer.css */

/* Reviews Main Content */
.reviews-main {
    position: relative;
    min-height: 100vh;
    padding-top: 120px;
    padding-bottom: 50px;
    z-index: 1; /* above .bg-layer */
}

.reviews-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.reviews-title {
    text-align: center;
    font-size: 3rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 3rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
    font-family: 'Audiowide', cursive;
}

/* Loading Container */
.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    text-align: center;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid #fff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

.loading-text {
    color: #fff;
    font-size: 1.1rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Error Container */
.error-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 4rem 2rem;
}

.error-message {
    text-align: center;
    color: #fff;
    max-width: 500px;
}

.error-message i {
    font-size: 3rem;
    color: #ff6b6b;
    margin-bottom: 1rem;
}

.error-message h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.error-message p {
    margin-bottom: 2rem;
    line-height: 1.6;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.retry-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    padding: 0.8rem 2rem;
    border-radius: 25px;
    cursor: pointer;
    font-family: 'Audiowide', cursive;
    font-size: 1rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.retry-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* No Reviews State */
.no-reviews {
    text-align: center;
    padding: 4rem 2rem;
    color: #fff;
}

.no-reviews p {
    font-size: 1.2rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

/* Reviews Grid */
.reviews-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

/* Review Card */
.review-card {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.review-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
    border-radius: 20px;
    z-index: -1;
}

.review-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    border-color: rgba(245, 245, 220, 0.4);
}

/* Review Header */
.review-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
}

.reviewer-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.reviewer-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    background-color: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.reviewer-details {
    display: flex;
    flex-direction: column;
}

.reviewer-name {
    font-size: 1.2rem;
    font-weight: bold;
    color: #fff;
    margin-bottom: 0.2rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.review-date {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
    font-weight: normal;
}

/* Star Rating */
.review-rating {
    display: flex;
    gap: 0.2rem;
}

.review-rating i {
    font-size: 1.1rem;
    color: #ffd700;
    text-shadow: 0 0 5px rgba(255, 215, 0, 0.5);
}

.review-rating .far {
    color: rgba(255, 255, 255, 0.3);
}

/* Review Content */
.review-content {
    color: #fff;
    line-height: 1.6;
    font-size: 1rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.review-content p {
    margin: 0;
    text-align: justify;
}

/* Loading Animation */
.reviews-main {
    opacity: 0;
    animation: fadeIn 0.8s ease-in-out forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Card Animation */
.review-card {
    opacity: 0;
    transform: translateY(30px);
    animation: slideInUp 0.6s ease-out forwards;
}

.review-card:nth-child(1) { animation-delay: 0.2s; }
.review-card:nth-child(2) { animation-delay: 0.4s; }
.review-card:nth-child(3) { animation-delay: 0.6s; }

@keyframes slideInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .reviews-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 1.5rem;
    }
    
    .reviews-title {
        font-size: 2.5rem;
    }
}

@media (max-width: 768px) {
    .reviews-main {
        padding-top: 100px;
        padding-bottom: 30px;
    }
    
    .reviews-container {
        padding: 0 1rem;
    }
    
    .reviews-title {
        font-size: 2rem;
        margin-bottom: 2rem;
    }
    
    .reviews-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .review-card {
        padding: 1.5rem;
    }
    
    .review-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    
    .reviewer-info {
        gap: 0.8rem;
    }
    
    .reviewer-avatar {
        width: 50px;
        height: 50px;
    }
    
    .reviewer-name {
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .reviews-main {
        padding-top: 80px;
    }
    
    .reviews-title {
        font-size: 1.8rem;
        margin-bottom: 1.5rem;
    }
    
    .review-card {
        padding: 1.2rem;
    }
    
    .reviewer-avatar {
        width: 45px;
        height: 45px;
    }
    
    .reviewer-name {
        font-size: 1rem;
    }
    
    .review-content {
        font-size: 0.9rem;
    }
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Ensure proper z-index for navigation */
.navbar {
    z-index: 1000;
}

/* Ensure body and html don't interfere with fixed positioning */
html, body {
    position: relative !important;
    overflow-x: hidden !important;
}

/* Floating Add Review Button */
.add-review-btn {
    position: fixed !important;
    bottom: 30px !important;
    right: 30px !important;
    width: 70px !important;
    height: 70px !important;
    border-radius: 50% !important;
    background: rgba(255, 255, 255, 0.15) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    color: #fff !important;
    font-size: 1.8rem !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1) !important;
    z-index: 9999 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    outline: none !important;
    pointer-events: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    /* Ensure it's not affected by parent elements */
    top: auto !important;
    left: auto !important;
    transform: none !important;
}

.add-review-btn:hover {
    background: rgba(255, 255, 255, 0.25) !important;
    transform: translateY(-3px) scale(1.1) !important;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15) !important;
}

.add-review-tooltip {
    position: absolute;
    right: 80px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-family: 'Audiowide', cursive;
    white-space: nowrap;
    opacity: 1;
    visibility: visible;
    transition: all 0.3s ease;
    pointer-events: none;
    z-index: 1001;
}

.add-review-tooltip::after {
    content: '';
    position: absolute;
    right: -5px;
    top: 50%;
    transform: translateY(-50%);
    border-left: 5px solid rgba(0, 0, 0, 0.8);
    border-top: 5px solid transparent;
    border-bottom: 5px solid transparent;
}

/* Add Review Popup */
.add-review-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    transition: opacity 0.3s ease;
    /* Fix scrolling issues */
    overflow-y: auto;
    overflow-x: hidden;
}

.add-review-popup.active {
    display: flex;
    opacity: 1;
}

.add-review-modal {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 2rem;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    transform: translateY(-20px);
    transition: transform 0.3s ease;
}

.add-review-popup.active .add-review-modal {
    transform: translateY(0);
}

.add-review-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.add-review-header h2 {
    color: #fff;
    font-size: 1.8rem;
    font-family: 'Audiowide', cursive;
    margin: 0;
}

.close-popup-btn {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.close-popup-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.1);
}

.add-review-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    color: #fff;
    font-weight: 600;
    font-family: 'Audiowide', cursive;
    font-size: 0.9rem;
}

.form-group input,
.form-group textarea {
    padding: 0.8rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-family: 'Audiowide', cursive;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.15);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

/* Rating Input */
.rating-input {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.stars {
    display: flex;
    gap: 0.3rem;
}

.stars i {
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: all 0.2s ease;
}

.stars i:hover,
.stars i.fas {
    color: #ffd700;
    text-shadow: 0 0 5px rgba(255, 215, 0, 0.5);
}

/* Form Actions */
.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.cancel-btn,
.submit-btn {
    padding: 0.8rem 2rem;
    border: none;
    border-radius: 10px;
    font-family: 'Audiowide', cursive;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    flex: 1;
}

.cancel-btn {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.cancel-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.submit-btn {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.submit-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

/* Responsive Design for Popup */
@media (max-width: 768px) {
    .add-review-btn {
        bottom: 20px;
        right: 20px;
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
    
    .add-review-tooltip {
        display: none;
    }
    
    .add-review-modal {
        padding: 1.5rem;
        margin: 1rem;
    }
    
    .add-review-header h2 {
        font-size: 1.5rem;
    }
    
    .form-actions {
        flex-direction: column;
    }
}

/* Character counter and input hint */
.char-counter {
    margin-top: 0.4rem;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.8);
    text-align: right;
}

.input-hint {
    display: block;
    margin-top: 0.4rem;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
}