/* Review System Styling */
.star-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    user-select: none;
    transition: all 0.2s ease;
}

.star-btn:hover {
    transform: scale(1.1);
}

.star-btn:active {
    transform: scale(0.95);
}

.review-item {
    transition: all 0.3s ease;
}

.review-item:hover {
    transform: translateY(-2px);
    border-color: #38bdf8;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

/* Review modal animations */
#reviewAuthModal, #reviewFormModal, #codeGeneratorModal {
    animation: fadeIn 0.3s ease-out;
}

#reviewAuthModal > div, #reviewFormModal > div, #codeGeneratorModal > div {
    animation: slideInUp 0.3s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

/* Rating distribution styling */
.rating-bar {
    transition: width 0.5s ease-out;
}

/* Mobile optimizations for review system */
@media (max-width: 640px) {
    .star-btn {
        font-size: 1.5rem;
        padding: 0.25rem;
    }

    .review-item {
        padding: 1rem;
    }

    #reviewFormModal > div, #reviewAuthModal > div, #codeGeneratorModal > div {
        margin: 0.5rem;
        max-height: calc(100vh - 1rem);
    }

    .review-item:hover {
        transform: none;
    }
}

/* Accessibility improvements */
.star-btn:focus {
    outline: 2px solid #38bdf8;
    outline-offset: 2px;
    border-radius: 2px;
}

/* Loading animation for review submission */
.review-loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Code generator specific styles */
#generatedCode {
    font-family: 'Courier New', Courier, monospace;
    letter-spacing: 1px;
}

/* Admin panel styles */
#adminPanel {
    backdrop-filter: blur(8px);
}

#adminPanel .code-success {
    animation: slideInDown 0.3s ease-out;
}

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

/* Enhanced focus styles for better accessibility */
.focus-ring:focus {
    outline: 2px solid #38bdf8;
    outline-offset: 2px;
}

.focus-ring:focus:not(:focus-visible) {
    outline: none;
}

/* Enhanced hover effects for buttons */
button:hover {
    transform: translateY(-1px);
    transition: all 0.2s ease;
}

button:active {
    transform: translateY(0);
}

/* Toast notification styles */
.toast {
    animation: slideInRight 0.3s ease-out;
}

.toast.removing {
    animation: slideOutRight 0.3s ease-in;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideOutRight {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(100%);
    }
}

/* Contact form success animation */
.animate-slide-in {
    animation: slideInRight 0.3s ease-out;
}
