/* ================================================
   Phlegon World - 50 Enhancement Features
   25 Design/Appearance Improvements
   ================================================ */

/* 1. Custom Scrollbar - Styled scrollbar for modern look */
::-webkit-scrollbar {
    width: 10px;
}
::-webkit-scrollbar-track {
    background: var(--dark-secondary);
}
::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--primary) 0%, var(--secondary) 100%);
    border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
    background: var(--primary-light);
}

/* 2. Focus States - Accessibility improvements */
a:focus-visible,
button:focus-visible,
.nav-link:focus-visible,
.btn-primary:focus-visible,
.btn-outline:focus-visible {
    outline: 2px solid var(--primary-light);
    outline-offset: 4px;
}

/* 3. Reduced Motion - Respect user preferences */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* 4. Glassmorphism Cards - Frosted glass effect */
.service-card,
.feature-card,
.about-card,
.contact-card,
.testimonial-card {
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

/* 5. Gradient Text Animation - Hero title shimmer */
.hero-title .title-highlight {
    background: linear-gradient(90deg, #fff 0%, #a78bfa 25%, #fff 50%, #a78bfa 75%, #fff 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 6s linear infinite;
}
@keyframes gradientShift {
    to { background-position: 200% center; }
}

/* 6. Grain Overlay - Subtle texture */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.03;
    pointer-events: none;
    z-index: 9999;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
}

/* 6a. إضاءة عامة — تأثير إضاءة خفيف من الأعلى */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9998;
    background: radial-gradient(
        ellipse 120% 80% at 50% -20%,
        rgba(124, 58, 237, 0.12) 0%,
        rgba(167, 139, 250, 0.06) 25%,
        transparent 50%
    );
}

/* 6b. Subtle starfield in hero - light twinkle */
.stars-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}
.star {
    position: absolute;
    background: #fff;
    border-radius: 50%;
    animation: starTwinkle 3s ease-in-out infinite;
}
@keyframes starTwinkle {
    0%, 100% { opacity: 0.3; transform: scale(1); }
    50% { opacity: 0.9; transform: scale(1.2); }
}

/* 7. Enhanced Button States */
.btn-primary:active,
.btn-outline:active {
    transform: scale(0.98);
}

/* 8. Section Divider - Gradient line between sections */
section:not(:first-child)::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
    opacity: 0.5;
}

/* 9. Enhanced Testimonial Card Shadow */
.testimonial-card:hover {
    box-shadow: 0 25px 50px -12px rgba(139, 92, 246, 0.25);
}

/* 10. Footer Gradient Border */
.footer-top {
    position: relative;
}
.footer-top::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
}

/* 11. Navbar Logo Hover - Subtle scale */
.nav-logo:hover .logo-icon {
    transform: rotate(15deg) scale(1.1);
}
.logo-icon {
    transition: transform 0.3s ease;
}

/* 12. Feature Card Icon Rotation on Hover */
.feature-card:hover .feature-icon {
    transform: rotateY(180deg);
}
.feature-icon {
    transition: transform 0.6s ease;
    transform-style: preserve-3d;
}

/* 13. CTA Section - Enhanced gradient background */
.cta-section {
    position: relative;
    overflow: hidden;
}
.cta-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at center, rgba(139, 92, 246, 0.15) 0%, transparent 50%);
    animation: ctaGlow 15s ease-in-out infinite;
}
@keyframes ctaGlow {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(5%, 5%); }
}

/* 14. Improved Touch Targets - Mobile accessibility */
@media (max-width: 768px) {
    .nav-link, .mobile-nav-link, .service-link {
        min-height: 44px;
        display: flex;
        align-items: center;
    }
}

/* 15. Badge Enhanced Pulse */
.badge-dot {
    animation: badgePulse 2s ease-in-out infinite;
}
@keyframes badgePulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(167, 139, 250, 0.5); }
    50% { opacity: 0.8; box-shadow: 0 0 0 8px rgba(167, 139, 250, 0); }
}

/* 16. Scroll Indicator Bounce */
.scroll-indicator {
    animation: scrollBounce 2s ease-in-out infinite;
}
@keyframes scrollBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(10px); }
}

/* 17. Contact Card Hover Lift */
.contact-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px -15px rgba(139, 92, 246, 0.3);
}

/* 18. Section Tag Glow */
.section-tag:hover {
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.4);
}

/* 19. Social Icon Hover - Rotate and glow */
.footer-social a:hover,
.social-icon:hover {
    transform: translateY(-3px) scale(1.1);
}

/* 20. About Stat Number - Gradient on hover */
.about-stat:hover .about-stat-number {
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* 21. Preloader Styles */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--dark-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    transition: opacity 0.5s, visibility 0.5s;
}
.preloader.hidden {
    opacity: 0;
    visibility: hidden;
}
.preloader-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(139, 92, 246, 0.2);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 22. Typing Cursor */
.typing-cursor {
    display: inline-block;
    width: 3px;
    height: 1em;
    background: var(--primary-light);
    margin-left: 2px;
    animation: cursorBlink 1s step-end infinite;
    vertical-align: text-bottom;
}
@keyframes cursorBlink {
    50% { opacity: 0; }
}

/* 23. Tooltip Base */
[data-tooltip] {
    position: relative;
}
[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-8px);
    padding: 6px 12px;
    background: var(--dark-tertiary);
    color: white;
    font-size: 0.75rem;
    border-radius: var(--radius-sm);
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s, transform 0.2s;
}
[data-tooltip]:hover::after {
    opacity: 1;
    transform: translateX(-50%) translateY(-4px);
}

/* 24. Services Section - No floating, stable layout */
#services .section-tag,
#services .service-card,
#services .service-quadrant-card {
    animation: none !important;
}

/* 24b. Card Stagger Animation */
.services-grid .service-card:nth-child(1) { animation-delay: 0.1s; }
.services-grid .service-card:nth-child(2) { animation-delay: 0.2s; }
.services-grid .service-card:nth-child(3) { animation-delay: 0.3s; }
.services-grid .service-card:nth-child(4) { animation-delay: 0.4s; }
.features-grid .feature-card:nth-child(1) { animation-delay: 0.05s; }
.features-grid .feature-card:nth-child(2) { animation-delay: 0.1s; }
.features-grid .feature-card:nth-child(3) { animation-delay: 0.15s; }
.features-grid .feature-card:nth-child(4) { animation-delay: 0.2s; }
.features-grid .feature-card:nth-child(5) { animation-delay: 0.25s; }
.features-grid .feature-card:nth-child(6) { animation-delay: 0.3s; }

/* 25. Selection Color */
::selection {
    background: rgba(139, 92, 246, 0.4);
    color: white;
}

/* ================================================
   ADDITIONAL ENHANCEMENTS (26-45)
   ================================================ */

/* 26. Loading Skeleton Pulse - For async content */
.skeleton {
    background: linear-gradient(90deg, rgba(139,92,246,0.1) 25%, rgba(139,92,246,0.2) 50%, rgba(139,92,246,0.1) 75%);
    background-size: 200% 100%;
    animation: skeletonPulse 1.5s ease-in-out infinite;
    border-radius: var(--radius-md);
}
@keyframes skeletonPulse {
    0%, 100% { background-position: 200% 0; }
    50% { background-position: -200% 0; }
}

/* 27. Service Link Arrow Animation */
.service-link:hover i {
    transform: translateX(6px);
}
.service-link i {
    transition: transform 0.3s ease;
}

/* 28. Testimonial Quote Icon Animation */
.testimonial-card:hover .testimonial-quote i {
    transform: scale(1.1) rotate(5deg);
}
.testimonial-quote i {
    transition: transform 0.3s ease;
}

/* 29. Back to Top - Enhanced Design */
.back-to-top {
    width: 56px;
    height: 56px;
    background: linear-gradient(145deg, rgba(139, 92, 246, 0.95) 0%, rgba(124, 58, 237, 0.95) 100%) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 2px solid rgba(255, 255, 255, 0.3) !important;
    box-shadow: 
        0 8px 32px rgba(139, 92, 246, 0.45),
        0 0 0 1px rgba(255, 255, 255, 0.1) inset,
        0 4px 20px rgba(0, 0, 0, 0.15) !important;
}
.back-to-top i.fa-arrow-up {
    font-size: 1.2rem;
    font-weight: 900;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
    filter: drop-shadow(0 1px 2px rgba(255, 255, 255, 0.3));
}
.back-to-top:hover {
    transform: translateY(-6px) scale(1.08) !important;
    box-shadow: 
        0 14px 45px rgba(139, 92, 246, 0.55),
        0 0 70px rgba(139, 92, 246, 0.25),
        0 0 0 2px rgba(255, 255, 255, 0.2) inset !important;
    border-color: rgba(255, 255, 255, 0.5) !important;
}
.back-to-top:hover i.fa-arrow-up {
    animation: arrowBounceUp 0.6s ease-in-out infinite alternate;
}
@keyframes arrowBounceUp {
    from { transform: translateY(0); }
    to { transform: translateY(-4px); }
}
.back-to-top .progress-ring-fill {
    stroke: rgba(255, 255, 255, 0.95) !important;
    stroke-width: 2.5 !important;
}
.back-to-top .progress-ring-bg {
    stroke: rgba(255, 255, 255, 0.2) !important;
    stroke-width: 2.5 !important;
}

/* 30. Navbar Link Underline Animation */
.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-light);
    transition: width 0.3s ease;
}
.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* 31. Section Title Letter Spacing on Hover */
.section-title:hover {
    letter-spacing: 0.02em;
}

/* 32. CTA Button Shine Effect */
.cta-section .btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.6s ease;
}
.cta-section .btn-primary:hover::before {
    left: 100%;
}

/* 33. Footer Link Hover - Slide */
.footer-links-group a {
    display: inline-block;
    position: relative;
}
.footer-links-group a:hover {
    transform: translateX(5px);
    color: var(--primary-light);
}

/* 34. Hero Content Fade In Up */
.hero-content {
    animation: heroFadeIn 1s ease-out;
}
@keyframes heroFadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 35. Icon Bounce on Hover */
.service-icon:hover i,
.feature-icon:hover i,
.contact-icon:hover i {
    animation: iconBounce 0.5s ease;
}
@keyframes iconBounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

/* 36. Gradient Border on Cards (hover) */
.service-card:hover,
.feature-card:hover {
    background-clip: padding-box;
    box-shadow: inset 0 0 0 1px rgba(139, 92, 246, 0.3);
}

/* 37. Smooth Image Zoom */
.about-card:hover .about-card-icon,
.testimonial-card:hover .author-avatar {
    transform: scale(1.05);
}

/* 38. Text Shadow on Hero */
.hero-title {
    text-shadow: 0 0 40px rgba(139, 92, 246, 0.2);
}

/* 39. Pulse Ring on Social Icons */
.footer-social a,
.social-icon {
    position: relative;
}
.footer-social a:hover::after,
.social-icon:hover::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    border: 2px solid var(--primary);
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(1.5);
    opacity: 0;
    animation: socialPulse 1s ease-out;
}
@keyframes socialPulse {
    to {
        transform: translate(-50%, -50%) scale(2);
        opacity: 0;
    }
}

/* 40. Dark Mode Support (system preference) */
@media (prefers-color-scheme: light) {
    :root {
        --preferred-contrast: 1.1;
    }
}

/* 41. Print Styles */
@media print {
    .navbar, .back-to-top, .scroll-indicator, .preloader,
    #globe-canvas, .hero-bg-effects, .btn-primary, .btn-outline {
        display: none !important;
    }
    body {
        background: white;
        color: black;
    }
    a {
        color: #333;
        text-decoration: underline;
    }
}

/* 42. High Contrast Focus */
@media (prefers-contrast: high) {
    a:focus-visible, button:focus-visible {
        outline: 3px solid white;
        outline-offset: 3px;
    }
}

/* 43. Responsive Typography */
@media (min-width: 1200px) {
    .section-title {
        font-size: 3rem;
    }
    .hero-title {
        font-size: 4.5rem;
    }
}

/* 44. Stagger Fade In for Section Headers */
.section-header {
    animation: fadeInUp 0.8s ease-out;
}

/* 45. Smooth Transitions for All Interactive Elements */
.service-card, .feature-card, .contact-card, .testimonial-card,
.about-card, .nav-link, .btn-primary, .btn-outline,
.footer-social a, .social-icon {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ================================================
   FEEDBACK & RATING SYSTEM (46-80)
   ================================================ */

/* Feedback Section Base */
.feedback-section {
    background: var(--dark-secondary);
    padding: var(--space-3xl) 0;
}

.feedback-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

/* Feedback Toggle Buttons */
.feedback-tabs {
    display: flex;
    justify-content: center;
    gap: var(--space-md);
    margin-bottom: var(--space-2xl);
    flex-wrap: wrap;
}

.feedback-toggle-btn {
    padding: var(--space-sm) var(--space-xl);
    background: var(--dark);
    color: var(--text-light);
    border: 1px solid var(--dark-tertiary);
    border-radius: var(--radius-full);
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-base);
}

.feedback-toggle-btn:hover {
    border-color: var(--primary);
    background: rgba(139, 92, 246, 0.1);
}

.feedback-toggle-btn.active {
    background: var(--gradient-1);
    border-color: transparent;
    color: white;
}

/* Feedback Panels */
.feedback-panel {
    display: none;
}

.feedback-panel.active {
    display: block;
    animation: fadeInUp 0.5s ease;
}

/* Analytics Grid */
.analytics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-lg);
    margin-bottom: var(--space-2xl);
}

.analytics-card {
    background: var(--dark);
    padding: var(--space-xl);
    border-radius: var(--radius-xl);
    border: 1px solid var(--dark-tertiary);
    text-align: center;
    transition: var(--transition-base);
}

.analytics-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-lg);
}

.analytics-card h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: var(--space-xs);
    color: var(--text-light);
}

.analytics-card p {
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* Score Circle */
.score-circle, .rate-circle {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto var(--space-md);
}

.score-circle svg, .rate-circle svg {
    transform: rotate(-90deg);
    width: 100%;
    height: 100%;
}

.score-circle circle, .rate-circle circle {
    fill: none;
    stroke-width: 8;
    stroke-linecap: round;
}

.score-bg, .rate-bg {
    stroke: var(--dark-tertiary);
}

.score-fill {
    stroke: var(--primary);
    transition: stroke-dasharray 1s ease;
}

.rate-fill {
    stroke: #10b981;
    transition: stroke-dasharray 1s ease;
}

.score-value, .rate-value {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.score-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary-light);
}

.score-max {
    font-size: 1rem;
    color: var(--text-muted);
}

.rate-number {
    font-size: 2rem;
    font-weight: 800;
    color: #10b981;
}

/* Distribution Chart */
.distribution-chart {
    text-align: left;
}

.distribution-bars {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.distribution-row {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.star-label-text {
    display: flex;
    align-items: center;
    gap: 4px;
    width: 60px;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.star-label-text i {
    color: #fbbf24;
    font-size: 0.75rem;
}

.bar-container {
    flex: 1;
    height: 8px;
    background: var(--dark-tertiary);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    background: var(--gradient-1);
    border-radius: var(--radius-full);
    transition: width 1s ease;
}

.bar-count {
    width: 25px;
    text-align: right;
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* Service Ratings */
.service-ratings-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.service-rating-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-sm) 0;
    border-bottom: 1px solid var(--dark-tertiary);
}

.service-rating-item:last-child {
    border-bottom: none;
}

.service-name {
    font-size: 0.875rem;
    color: var(--text-light);
    flex: 1;
}

.service-stars {
    display: flex;
    gap: 2px;
}

.service-stars i {
    font-size: 0.75rem;
    color: var(--dark-tertiary);
}

.service-stars i.active {
    color: #fbbf24;
}

.service-score {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--primary-light);
    margin-left: var(--space-sm);
}

/* Feedback Form */
.feedback-form-container {
    background: var(--dark);
    padding: var(--space-xl);
    border-radius: var(--radius-xl);
    border: 1px solid var(--dark-tertiary);
    max-width: 700px;
    margin: 0 auto;
}

.feedback-form-container h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: var(--space-lg);
    text-align: center;
}

.feedback-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-md);
    margin-bottom: var(--space-md);
}

.feedback-form-group {
    margin-bottom: var(--space-md);
}

.feedback-form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: var(--space-xs);
    color: var(--text-light);
}

.feedback-form-group input,
.feedback-form-group select,
.feedback-form-group textarea {
    width: 100%;
    padding: var(--space-sm) var(--space-md);
    background: var(--dark-secondary);
    border: 1px solid var(--dark-tertiary);
    border-radius: var(--radius-md);
    color: var(--text-light);
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition-base);
}

.feedback-form-group input:focus,
.feedback-form-group select:focus,
.feedback-form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.2);
}

.feedback-form-group textarea {
    resize: vertical;
    min-height: 100px;
}

/* Star Rating Input */
.rating-input {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
}

.stars-input {
    display: flex;
    flex-direction: row-reverse;
    gap: var(--space-xs);
}

.stars-input input {
    display: none;
}

.stars-input .star-label {
    cursor: pointer;
    font-size: 1.75rem;
    color: var(--dark-tertiary);
    transition: var(--transition-fast);
}

.stars-input .star-label:hover,
.stars-input .star-label:hover ~ .star-label,
.stars-input input:checked ~ .star-label {
    color: #fbbf24;
    text-shadow: 0 0 10px rgba(251, 191, 36, 0.5);
}

.rating-text {
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* Submit Button */
.feedback-submit-btn {
    width: 100%;
    padding: var(--space-md) var(--space-xl);
    background: var(--gradient-1);
    color: white;
    font-weight: 600;
    font-size: 1rem;
    border: none;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: var(--transition-base);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
}

.feedback-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

/* Feedback List */
.feedback-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.feedback-card {
    background: var(--dark);
    padding: var(--space-xl);
    border-radius: var(--radius-xl);
    border: 1px solid var(--dark-tertiary);
    transition: var(--transition-base);
}

.feedback-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-lg);
}

.feedback-header {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin-bottom: var(--space-md);
}

.feedback-avatar {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-1);
    border-radius: var(--radius-full);
    font-weight: 700;
    color: white;
    font-size: 1rem;
}

.feedback-info {
    flex: 1;
}

.feedback-info h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 2px;
}

.feedback-company {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.feedback-rating {
    display: flex;
    gap: 2px;
}

.feedback-rating i {
    font-size: 0.875rem;
    color: var(--dark-tertiary);
}

.feedback-rating i.active {
    color: #fbbf24;
}

.feedback-service {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-xs) var(--space-sm);
    background: rgba(139, 92, 246, 0.1);
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    color: var(--primary-light);
    margin-bottom: var(--space-md);
}

.feedback-service i {
    font-size: 0.625rem;
}

.feedback-comment {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--text-light);
    margin-bottom: var(--space-md);
}

.feedback-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: var(--space-md);
    border-top: 1px solid var(--dark-tertiary);
}

.feedback-date {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    font-size: 0.875rem;
    color: var(--text-muted);
}

.reply-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-xs) var(--space-sm);
    background: transparent;
    color: var(--primary-light);
    border: 1px solid var(--primary);
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    cursor: pointer;
    transition: var(--transition-base);
}

.reply-btn:hover {
    background: var(--primary);
    color: white;
}

/* Replies */
.feedback-replies {
    margin-top: var(--space-lg);
    padding-left: var(--space-xl);
    border-left: 2px solid var(--dark-tertiary);
}

.reply-card {
    background: var(--dark-secondary);
    padding: var(--space-md);
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-sm);
}

.reply-card:last-child {
    margin-bottom: 0;
}

.reply-header {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-xs);
}

.reply-avatar {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #10b981;
    border-radius: var(--radius-full);
    color: white;
    font-size: 0.75rem;
}

.reply-info h5 {
    font-size: 0.875rem;
    font-weight: 600;
    color: #10b981;
}

.reply-info span {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.reply-comment {
    font-size: 0.875rem;
    line-height: 1.6;
    color: var(--text-light);
}

/* Reply Form */
.reply-form {
    margin-top: var(--space-md);
    padding: var(--space-md);
    background: var(--dark-secondary);
    border-radius: var(--radius-lg);
}

.reply-form textarea {
    width: 100%;
    padding: var(--space-sm);
    background: var(--dark);
    border: 1px solid var(--dark-tertiary);
    border-radius: var(--radius-md);
    color: var(--text-light);
    font-family: inherit;
    font-size: 0.875rem;
    resize: vertical;
    min-height: 80px;
    margin-bottom: var(--space-sm);
}

.reply-form textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.reply-form-actions {
    display: flex;
    justify-content: flex-end;
    gap: var(--space-sm);
}

.btn-cancel {
    padding: var(--space-xs) var(--space-md);
    background: transparent;
    color: var(--text-muted);
    border: 1px solid var(--dark-tertiary);
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    cursor: pointer;
    transition: var(--transition-base);
}

.btn-cancel:hover {
    border-color: var(--text-light);
    color: var(--text-light);
}

.btn-submit {
    padding: var(--space-xs) var(--space-md);
    background: var(--gradient-1);
    color: white;
    border: none;
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    cursor: pointer;
    transition: var(--transition-base);
}

.btn-submit:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

/* Export Button */
.export-report-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-lg);
    background: var(--dark);
    color: var(--text-light);
    border: 1px solid var(--dark-tertiary);
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    cursor: pointer;
    transition: var(--transition-base);
    margin-top: var(--space-xl);
}

.export-report-btn:hover {
    border-color: var(--primary);
    background: rgba(139, 92, 246, 0.1);
}

/* Responsive */
@media (max-width: 768px) {
    .feedback-form-row {
        grid-template-columns: 1fr;
    }
    
    .feedback-header {
        flex-wrap: wrap;
    }
    
    .feedback-rating {
        width: 100%;
        margin-top: var(--space-sm);
    }
    
    .analytics-grid {
        grid-template-columns: 1fr;
    }
}

/* ================================================
   Language Dropdown (Language / اللغة)
   ================================================ */
.lang-dropdown {
    position: relative;
    margin-left: var(--space-lg);
}
.lang-trigger {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-xs) var(--space-md);
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-light);
    background: rgba(139, 92, 246, 0.15);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition-base);
}
.lang-trigger:hover {
    background: rgba(139, 92, 246, 0.25);
    border-color: var(--primary);
}
.lang-trigger .lang-trigger-arrow {
    font-size: 0.7rem;
    transition: transform var(--transition-base);
}
.lang-dropdown.open .lang-trigger-arrow {
    transform: rotate(180deg);
}
.lang-dropdown-menu {
    position: absolute;
    top: calc(100% + var(--space-xs));
    right: 0;
    min-width: 140px;
    padding: var(--space-xs);
    background: var(--dark-secondary);
    border: 1px solid var(--dark-tertiary);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-xl);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-4px);
    transition: var(--transition-base);
    z-index: 1002;
}
[dir="rtl"] .lang-dropdown-menu {
    right: auto;
    left: 0;
}
.lang-dropdown.open .lang-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.lang-option {
    display: block;
    width: 100%;
    padding: var(--space-sm) var(--space-md);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-light);
    background: transparent;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    text-align: left;
    transition: var(--transition-fast);
}
[dir="rtl"] .lang-option {
    text-align: right;
}
.lang-option:hover {
    background: rgba(139, 92, 246, 0.2);
    color: var(--primary-light);
}
.lang-option.active {
    background: rgba(139, 92, 246, 0.25);
    color: var(--primary-light);
}
[dir="rtl"] .lang-dropdown {
    margin-left: 0;
    margin-right: var(--space-lg);
}
@media (max-width: 992px) {
    .nav-container .lang-dropdown {
        display: none;
    }
}
/* Mobile language section */
.mobile-lang-switcher {
    padding: var(--space-lg) 0 0;
    margin-top: var(--space-lg);
    border-top: 1px solid var(--dark-tertiary);
}
.mobile-lang-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: var(--space-sm);
}
.mobile-lang-dropdown {
    margin: 0;
}
.mobile-lang-trigger {
    width: 100%;
    justify-content: space-between;
    padding: var(--space-md);
    font-size: 1rem;
}
.mobile-lang-dropdown .lang-dropdown-menu {
    position: static;
    min-width: 100%;
    margin-top: var(--space-xs);
    opacity: 1;
    visibility: visible;
    transform: none;
    display: none;
    box-shadow: none;
    border: none;
    background: transparent;
    padding: 0;
}
.mobile-lang-dropdown.open .lang-dropdown-menu {
    display: block;
}
.mobile-lang-dropdown .lang-option {
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-md);
}
[dir="rtl"] .mobile-menu {
    right: auto;
    left: -100%;
}
[dir="rtl"] .mobile-menu.active {
    right: auto;
    left: 0;
}

/* ================================================
   ENHANCED COMMENTS SECTION
   Improved styling with better organization,
   RTL support, and mobile responsiveness
   ================================================ */

/* ================================================
   Comments Section Container
   Main wrapper for the entire comments area
   ================================================ */
.comments-section {
    background: var(--dark-secondary);
    border-top: 1px solid rgba(124, 58, 237, 0.15);
    padding: 32px 20px;
}

/* Comments Count Header - Shows number of comments */
.comments-header {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-light);
    margin-bottom: 24px;
}

/* ================================================
   Comments Form Section
   Input form for adding new comments
   ================================================ */
.comments-form-wrap {
    max-width: 680px;
    margin: 0 auto 32px;
}

.comments-form {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

/* Form Avatar - User's profile picture placeholder */
.comment-form-avatar {
    width: 40px;
    height: 40px;
    min-width: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff0000 0%, #cc0000 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1rem;
    color: #fff;
    text-transform: uppercase;
    box-shadow: 0 2px 8px rgba(255, 0, 0, 0.3);
}

/* Form Input Fields Container */
.comment-form-inputs {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Text Input and Textarea - Comment fields */
.comments-form .comments-input,
.comments-form .comments-textarea {
    width: 100%;
    padding: 12px 0;
    font-family: inherit;
    font-size: 0.95rem;
    color: var(--text-light);
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 0;
    transition: all 0.3s ease;
}

.comments-form .comments-input:focus,
.comments-form .comments-textarea:focus {
    outline: none;
    border-bottom-color: var(--primary-light);
    background: rgba(255, 255, 255, 0.03);
}

.comments-form .comments-input::placeholder,
.comments-form .comments-textarea::placeholder {
    color: var(--text-muted);
}

.comments-form .comments-textarea {
    resize: vertical;
    min-height: 60px;
    max-height: 200px;
}

/* Form Action Buttons - Cancel and Submit */
.comments-form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 8px;
}

/* Cancel Button */
.comments-cancel-btn {
    padding: 10px 20px;
    background: transparent;
    color: var(--text-light);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.comments-cancel-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
}

/* Submit Button - Primary action */
.comments-submit-btn {
    padding: 10px 24px;
    background: linear-gradient(135deg, #ff0000 0%, #cc0000 100%);
    color: #fff;
    border: none;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(255, 0, 0, 0.3);
}

.comments-submit-btn:hover {
    background: linear-gradient(135deg, #ff1111 0%, #dd0000 100%);
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(255, 0, 0, 0.4);
}

.comments-submit-btn:disabled {
    background: rgba(255, 0, 0, 0.4);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* ================================================
   Comments List Container
   Holds all individual comments
   ================================================ */
.comments-list {
    max-width: 720px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* ================================================
   Individual Comment Item
   Single comment with author, content, actions
   ================================================ */
.comment-item {
    display: flex;
    gap: 12px;
    padding: 16px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: transparent;
    transition: none;
    animation: fadeInUp 0.4s ease forwards;
    opacity: 0;
}

.comment-item:last-child {
    border-bottom: none;
}

/* Comment Avatar - Author's initial/photo */
.comment-avatar {
    width: 40px;
    height: 40px;
    min-width: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #8b5cf6, #a855f7);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.85rem;
    color: #fff;
    text-transform: uppercase;
    box-shadow: 0 2px 8px rgba(139, 92, 246, 0.4);
    flex-shrink: 0;
}

/* Comment Content Area */
.comment-content {
    flex: 1;
    min-width: 0;
}

/* Comment Header - Author name, date, badges */
.comment-header {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 4px;
}

/* Author Name */
.comment-author {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-light);
}

/* Verified Badge */
.comment-verified {
    color: #3ea6ff;
    font-size: 0.75rem;
    margin-left: 2px;
}

/* RTL Support for verified badge */
[dir="rtl"] .comment-verified {
    margin-left: 0;
    margin-right: 2px;
}

/* Comment Date - Timestamp */
.comment-date {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-left: 0;
}

/* RTL fix for date */
[dir="rtl"] .comment-date {
    margin-right: 0;
}

/* Comment Body - The actual comment text */
.comment-body {
    color: var(--light-secondary);
    line-height: 1.6;
    margin-bottom: 8px;
    font-size: 0.95rem;
    word-wrap: break-word;
}

/* ================================================
   Comment Actions Bar
   Like, dislike, reply, share buttons
   ================================================ */
.comment-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 4px;
    flex-wrap: wrap;
}

/* Action Buttons - Like, Dislike, Reply, etc. */
.comment-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: transparent;
    border: none;
    border-radius: 20px;
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.comment-action-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-light);
}

.comment-action-btn i {
    font-size: 1rem;
}

/* Liked State - When user has liked */
.comment-action-btn.liked {
    color: #3ea6ff;
}

.comment-action-btn.liked:hover {
    background: rgba(62, 166, 255, 0.15);
}

/* Disliked State - When user has disliked */
.comment-action-btn.disliked {
    color: #ff4d4d;
}

.comment-action-btn.disliked:hover {
    background: rgba(255, 77, 77, 0.15);
}

/* Action Count - Number of likes/dislikes */
.comment-action-btn .action-count {
    font-size: 0.8rem;
    font-weight: 600;
}

/* Reply Button - Specific styling */
.comment-reply-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 16px;
    background: transparent;
    border: none;
    border-radius: 20px;
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.comment-reply-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-light);
}

/* ================================================
   Developer Reply Section
   Special styling for developer responses
   ================================================ */
.comment-reply {
    margin-top: 12px;
    padding: 12px 16px;
    padding-left: 16px;
    border-left: 2px solid rgba(139, 92, 246, 0.5);
    background: rgba(139, 92, 246, 0.08);
    border-radius: 0 12px 12px 0;
}

/* RTL Support for developer reply */
[dir="rtl"] .comment-reply {
    padding-left: 12px;
    padding-right: 16px;
    border-left: none;
    border-right: 2px solid rgba(139, 92, 246, 0.5);
    border-radius: 12px 0 0 12px;
}

/* Reply Header - "Developer Reply" label */
.comment-reply-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

/* Developer Reply Label */
.comment-reply-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #a855f7;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Reply Body Text */
.comment-reply-body {
    color: var(--light-secondary);
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Reply Date */
.comment-reply-date {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-left: 8px;
}

/* RTL fix for reply date */
[dir="rtl"] .comment-reply-date {
    margin-left: 0;
    margin-right: 8px;
}

/* ================================================
   Nested Replies
   Replies to comments (threaded view)
   ================================================ */
.comment-replies {
    margin-top: 12px;
    padding-left: 52px;
    border-left: 2px solid rgba(255, 255, 255, 0.1);
}

/* RTL Support for nested replies */
[dir="rtl"] .comment-replies {
    padding-left: 0;
    padding-right: 52px;
    border-left: none;
    border-right: 2px solid rgba(255, 255, 255, 0.1);
}

/* Nested Comment Item */
.comment-replies .comment-item {
    padding: 12px 0;
}

/* ================================================
   Reply Form
   Input form for replying to comments
   ================================================ */
.reply-form-wrap {
    margin-top: 12px;
    margin-left: 52px;
}

/* RTL Support for reply form */
[dir="rtl"] .reply-form-wrap {
    margin-left: 0;
    margin-right: 52px;
}

/* Reply Textarea */
.reply-form-wrap textarea {
    width: 100%;
    padding: 12px 16px;
    font-family: inherit;
    font-size: 0.9rem;
    color: var(--text-light);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    margin-bottom: 8px;
    min-height: 60px;
    resize: vertical;
    transition: all 0.2s ease;
}

.reply-form-wrap textarea:focus {
    outline: none;
    border-color: var(--primary-light);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

/* Reply Form Actions */
.reply-form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.reply-form-actions button {
    padding: 8px 16px;
    font-size: 0.85rem;
    font-weight: 600;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
}

/* Cancel Reply Button */
.reply-cancel-btn {
    background: transparent;
    color: var(--text-light);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.reply-cancel-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
}

/* Submit Reply Button */
.reply-submit-btn {
    background: linear-gradient(135deg, #3ea6ff 0%, #2d9aff 100%);
    color: #000;
}

.reply-submit-btn:hover {
    background: linear-gradient(135deg, #4db3ff 0%, #3aa8ff 100%);
    transform: translateY(-1px);
}

/* ================================================
   Empty State
   Shown when no comments exist
   ================================================ */
.comments-empty {
    text-align: center;
    color: var(--text-muted);
    padding: 40px 20px;
    font-size: 0.95rem;
    font-style: italic;
}

/* ================================================
   Character Counter
   Shows remaining characters for comment input
   ================================================ */
.comment-char-counter {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-align: right;
    margin-top: 4px;
    transition: color 0.2s ease;
}

.comment-char-counter.warning {
    color: #fbbf24;
}

.comment-char-counter.error {
    color: #ff4d4d;
}

/* ================================================
   Comments Controls
   Search and sort controls container
   ================================================ */
.comments-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

/* Search Container */
.comments-search {
    position: relative;
    flex: 1;
    max-width: 300px;
}

.comments-search-input {
    width: 100%;
    padding: 10px 16px 10px 40px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    color: var(--text-light);
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.comments-search-input:focus {
    outline: none;
    border-color: var(--primary-light);
    background: rgba(255, 255, 255, 0.08);
}

.comments-search-input::placeholder {
    color: var(--text-muted);
}

.comments-search i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* RTL Support for search icon */
[dir="rtl"] .comments-search i {
    left: auto;
    right: 14px;
}

[dir="rtl"] .comments-search-input {
    padding: 10px 40px 10px 16px;
}

/* Sort Container */
.comments-sort {
    display: flex;
    align-items: center;
    gap: 8px;
}

.comments-sort-label {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.comments-sort-select {
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    color: var(--text-light);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.comments-sort-select:focus {
    outline: none;
    border-color: var(--primary-light);
}

/* Comments Count Display */
.comments-count {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 16px;
}

/* Load More Button */
.comments-load-more {
    text-align: center;
    margin-top: 24px;
}

.load-more-btn {
    padding: 12px 32px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: #fff;
    border: none;
    border-radius: 25px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}

.load-more-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.4);
}

/* ================================================
   Comment Badges
   Admin and Developer badges
   ================================================ */
.comment-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

/* Admin Badge */
.admin-badge {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

/* Developer Badge */
.developer-badge {
    background: rgba(139, 92, 246, 0.2);
    color: #a855f7;
    border: 1px solid rgba(139, 92, 246, 0.3);
}

/* ================================================
   Emoji Reactions
   Reaction picker and counts
   ================================================ */
.comment-reactions {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.reaction-trigger-btn {
    padding: 6px 10px;
    background: transparent;
    border: none;
    border-radius: 15px;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
}

.reaction-trigger-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-light);
}

.reaction-picker {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 4px;
    padding: 8px;
    background: var(--dark-secondary);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 25px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    z-index: 100;
}

.reaction-emoji {
    padding: 6px;
    background: transparent;
    border: none;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.reaction-emoji:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.2);
}

.reaction-emoji.active {
    background: rgba(139, 92, 246, 0.2);
}

.reaction-counts {
    display: flex;
    gap: 4px;
    margin-left: 8px;
}

.reaction-count {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ================================================
   Share Options
   Social media sharing dropdown
   ================================================ */
.comment-share {
    position: relative;
    display: inline-flex;
}

.share-trigger-btn {
    padding: 6px 10px;
    background: transparent;
    border: none;
    border-radius: 15px;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
}

.share-trigger-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-light);
}

.share-options {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    padding: 8px;
    background: var(--dark-secondary);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    z-index: 100;
}

.share-option {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 50%;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.share-option.twitter {
    background: rgba(29, 161, 242, 0.2);
    color: #1da1f2;
}

.share-option.twitter:hover {
    background: #1da1f2;
    color: #fff;
}

.share-option.facebook {
    background: rgba(59, 89, 152, 0.2);
    color: #3b5998;
}

.share-option.facebook:hover {
    background: #3b5998;
    color: #fff;
}

.share-option.whatsapp {
    background: rgba(37, 211, 102, 0.2);
    color: #25d366;
}

.share-option.whatsapp:hover {
    background: #25d366;
    color: #fff;
}

/* ================================================
   Edit Comment Form
   Form for editing existing comments
   ================================================ */
.edit-form {
    margin-top: 12px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
}

.edit-textarea {
    width: 100%;
    padding: 12px;
    background: var(--dark);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: var(--text-light);
    font-family: inherit;
    font-size: 0.9rem;
    resize: vertical;
    min-height: 80px;
    margin-bottom: 8px;
    transition: all 0.2s ease;
}

.edit-textarea:focus {
    outline: none;
    border-color: var(--primary-light);
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

/* Edit Form Actions */
.edit-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.edit-save-btn {
    padding: 8px 20px;
    background: linear-gradient(135deg, #8b5cf6 0%, #a855f7 100%);
    color: #fff;
    border: none;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.edit-save-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.4);
}

.edit-cancel-btn {
    padding: 8px 20px;
    background: transparent;
    color: var(--text-light);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.edit-cancel-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
}

/* Responsive Design for Comments */
@media (max-width: 600px) {
    .comments-section {
        padding: 24px 16px;
    }
    
    .comments-form {
        gap: 10px;
    }
    
    .comment-form-avatar {
        width: 36px;
        height: 36px;
        min-width: 36px;
        font-size: 0.9rem;
    }
    
    .comment-item {
        gap: 10px;
        padding: 12px 0;
    }
    
    .comment-avatar {
        width: 36px;
        height: 36px;
        min-width: 36px;
        font-size: 0.8rem;
    }
    
    .comment-body {
        font-size: 0.9rem;
        line-height: 1.5;
    }
    
    .comment-actions {
        gap: 6px;
    }
    
    .comment-action-btn {
        padding: 6px 8px;
        font-size: 0.8rem;
    }
    
    .comment-replies {
        padding-left: 24px;
    }
    
    [dir="rtl"] .comment-replies {
        padding-left: 0;
        padding-right: 24px;
    }
    
    .reply-form-wrap {
        margin-left: 24px;
    }
    
    [dir="rtl"] .reply-form-wrap {
        margin-left: 0;
        margin-right: 24px;
    }
    
    .comments-controls {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    
    .comments-search {
        max-width: 100%;
    }
    
    .comments-sort {
        justify-content: space-between;
    }
    
    .reaction-picker,
    .share-options {
        left: 0;
        transform: translateX(0);
    }
    
    [dir="rtl"] .reaction-picker,
    [dir="rtl"] .share-options {
        left: auto;
        right: 0;
        transform: translateX(0);
    }
}

/* Tablet Devices */
@media (min-width: 601px) and (max-width: 900px) {
    .comments-section {
        padding: 28px 18px;
    }
    
    .comments-form-wrap,
    .comments-list {
        max-width: 100%;
    }
    
    .comment-item {
        padding: 14px 0;
    }
}

/* Animations for Comments */
@keyframes commentFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes commentPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(139, 92, 246, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(139, 92, 246, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(139, 92, 246, 0);
    }
}

.comment-item.new-comment {
    animation: commentPulse 0.6s ease-out;
}

.comment-item:hover {
    background: rgba(255, 255, 255, 0.02);
}

/* Expand/Collapse animation */
.comment-expand-btn {
    display: inline-block;
    margin-top: 4px;
    padding: 4px 12px;
    background: transparent;
    border: none;
    color: var(--primary-light);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.comment-expand-btn:hover {
    text-decoration: underline;
}

/* Mention styling in comments */
.comment-mention {
    color: var(--primary-light);
    font-weight: 500;
    background: rgba(139, 92, 246, 0.15);
    padding: 1px 4px;
    border-radius: 4px;
}

/* Edited indicator */
.comment-edited {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-style: italic;
    margin-left: 4px;
}

[dir="rtl"] .comment-edited {
    margin-left: 0;
    margin-right: 4px;
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

[dir="rtl"] .toast-container {
    right: auto;
    left: 24px;
}

.toast {
    padding: 12px 20px;
    background: var(--dark-secondary);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: var(--text-light);
    font-size: 0.9rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.toast.toast-show {
    opacity: 1;
    transform: translateY(0);
}

.toast-success {
    border-left: 3px solid #10b981;
}

.toast-error {
    border-left: 3px solid #ef4444;
}

[dir="rtl"] .toast-success {
    border-left: none;
    border-right: 3px solid #10b981;
}

[dir="rtl"] .toast-error {
    border-left: none;
    border-right: 3px solid #ef4444;
}

/* Loading Skeleton for Comments */
.comments-skeleton {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.skeleton-item {
    display: flex;
    gap: 12px;
}

.skeleton-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(90deg, rgba(139,92,246,0.1) 25%, rgba(139,92,246,0.2) 50%, rgba(139,92,246,0.1) 75%);
    background-size: 200% 100%;
    animation: skeletonPulse 1.5s ease-in-out infinite;
}

.skeleton-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.skeleton-author {
    width: 120px;
    height: 16px;
    border-radius: 4px;
    background: linear-gradient(90deg, rgba(139,92,246,0.1) 25%, rgba(139,92,246,0.2) 50%, rgba(139,92,246,0.1) 75%);
    background-size: 200% 100%;
    animation: skeletonPulse 1.5s ease-in-out infinite;
}

.skeleton-text {
    width: 100%;
    height: 14px;
    border-radius: 4px;
    background: linear-gradient(90deg, rgba(139,92,246,0.1) 25%, rgba(139,92,246,0.2) 50%, rgba(139,92,246,0.1) 75%);
    background-size: 200% 100%;
    animation: skeletonPulse 1.5s ease-in-out infinite;
}

.skeleton-text.short {
    width: 60%;
}

.skeleton-loading-text {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    padding: 20px;
}

/* Mentions Dropdown */
.mentions-dropdown {
    position: absolute;
    bottom: 100%;
    left: 0;
    width: 200px;
    max-height: 200px;
    overflow-y: auto;
    background: var(--dark-secondary);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    margin-bottom: 4px;
}

.mentions-dropdown-item {
    padding: 10px 14px;
    font-size: 0.9rem;
    color: var(--text-light);
    cursor: pointer;
    transition: background 0.2s ease;
}

.mentions-dropdown-item:hover {
    background: rgba(139, 92, 246, 0.2);
    color: var(--primary-light);
}

/* Copy Link Button */
.copy-link-btn {
    position: relative;
}

/* Scroll Progress for Comments */
.comments-scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: rgba(139, 92, 246, 0.2);
    z-index: 9999;
}

.comments-scroll-progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #8b5cf6, #a855f7);
    transition: width 0.1s ease;
}
