/* CS Reactions & Stats - Premium Dark Theme */

:root {
    --cs-primary: #8b5cf6;
    --cs-primary-dark: #7c3aed;
    --cs-secondary: #ec4899;
    --cs-bg-dark: #0f172a;
    --cs-bg-card: #1e293b;
    --cs-bg-card-hover: #334155;
    --cs-text-primary: #f1f5f9;
    --cs-text-secondary: #cbd5e1;
    --cs-border: rgba(148, 163, 184, 0.1);
    --cs-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3), 0 10px 10px -5px rgba(0, 0, 0, 0.2);
    --cs-shadow-lg: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

/* Container */
.cs-reactions-stats-container {
    max-width: 800px;
    margin: 2rem auto;
    padding: 2rem;
    background: linear-gradient(135deg, var(--cs-bg-dark) 0%, #1a1f35 100%);
    border-radius: 24px;
    box-shadow: var(--cs-shadow-lg);
    border: 1px solid var(--cs-border);
    position: relative;
    overflow: hidden;
}

.cs-reactions-stats-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--cs-primary), var(--cs-secondary), var(--cs-primary));
    background-size: 200% 100%;
    animation: gradientShift 3s ease infinite;
}

@keyframes gradientShift {

    0%,
    100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

/* Stats Section */
.cs-stats-section {
    margin-top: 2.5rem;
    margin-bottom: 0;
}

.cs-stats-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--cs-text-primary);
    margin-bottom: 1rem;
    text-align: center;
    letter-spacing: -0.02em;
}

.cs-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
}

.cs-stat-item {
    background: var(--cs-bg-card);
    padding: 0.75rem 0.5rem;
    border-radius: 12px;
    text-align: center;
    border: 1px solid var(--cs-border);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.cs-stat-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--cs-primary), var(--cs-secondary));
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.cs-stat-item:hover::before {
    transform: scaleX(1);
}

.cs-stat-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--cs-shadow);
    background: var(--cs-bg-card-hover);
}

.cs-stat-label {
    display: block;
    font-size: 0.7rem;
    color: var(--cs-text-secondary);
    margin-bottom: 0.35rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

.cs-stat-value {
    display: block;
    font-size: 1.25rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--cs-primary), var(--cs-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

@media (max-width: 640px) {
    .cs-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Reactions Section */
.cs-reactions-section {
    margin-bottom: 2.5rem;
}

.cs-reactions-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--cs-text-primary);
    margin-bottom: 1.5rem;
    text-align: center;
}

.cs-reaction-buttons {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.75rem;
    justify-content: center;
}

.cs-reaction-btn {
    flex: 1 1 0;
    min-width: 0;
    padding: 1rem 0.5rem 2rem;
    /* Increased bottom padding */
    background: var(--cs-bg-card);
    border: 2px solid var(--cs-border);
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    position: relative;
    overflow: hidden;
}

.cs-reaction-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.3), transparent);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.cs-reaction-btn:hover::before {
    width: 300px;
    height: 300px;
}

.cs-reaction-btn:hover {
    transform: translateY(-6px) scale(1.05);
    border-color: var(--cs-primary);
    box-shadow: 0 10px 30px -5px rgba(139, 92, 246, 0.4);
    background: var(--cs-bg-card-hover);
}

.cs-reaction-btn:active {
    transform: translateY(-2px) scale(0.98);
}

.cs-reaction-btn.cs-reacted {
    border-color: var(--cs-secondary);
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.2), rgba(236, 72, 153, 0.2));
}

.cs-reaction-emoji {
    font-size: 2.5rem;
    line-height: 1;
    transition: transform 0.3s ease;
    position: relative;
    z-index: 1;
}

.cs-reaction-btn:hover .cs-reaction-emoji {
    transform: scale(1.2) rotate(10deg);
}

.cs-reaction-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--cs-text-primary);
    text-align: center;
    position: relative;
    z-index: 1;
    display: block;
    line-height: 1.2;
    padding-bottom: 5px;
    /* Added spacing */
}

@media (max-width: 768px) {
    .cs-reaction-buttons {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .cs-reaction-btn {
        flex: 1 1 calc(50% - 0.25rem);
        min-width: 0;
        max-width: none;
        padding: 0.75rem 0.5rem;
    }

    .cs-reaction-emoji {
        font-size: 1.75rem;
    }

    .cs-reaction-label {
        font-size: 0.65rem;
    }
}

@media (max-width: 480px) {
    .cs-reaction-btn {
        padding: 0.65rem 0.35rem;
    }

    .cs-reaction-emoji {
        font-size: 1.5rem;
    }

    .cs-reaction-label {
        font-size: 0.6rem;
    }
}

/* Reaction Stats Section */
.cs-reaction-stats-section {
    margin-top: 2.5rem;
}

.cs-reaction-stats-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--cs-text-primary);
    margin-bottom: 1.5rem;
    text-align: center;
}

.cs-reaction-stats-list {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.cs-reaction-stat-item {
    background: var(--cs-bg-card);
    padding: 1.25rem;
    border-radius: 16px;
    border: 1px solid var(--cs-border);
    transition: all 0.3s ease;
}

.cs-reaction-stat-item:hover {
    background: var(--cs-bg-card-hover);
    transform: translateX(8px);
}

.cs-reaction-stat-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.cs-reaction-stat-emoji {
    font-size: 1.75rem;
    line-height: 1;
}

.cs-reaction-stat-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--cs-text-primary);
    flex: 1;
}

.cs-reaction-stat-count {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--cs-text-secondary);
    background: rgba(139, 92, 246, 0.2);
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
}

/* Progress Bars */
.cs-progress-bar {
    height: 12px;
    background: rgba(148, 163, 184, 0.1);
    border-radius: 12px;
    overflow: hidden;
    position: relative;
}

.cs-progress-fill {
    height: 100%;
    border-radius: 12px;
    transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.cs-progress-fill::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% {
        left: -100%;
    }

    100% {
        left: 100%;
    }
}

.cs-progress-heart {
    background: linear-gradient(90deg, #ef4444, #dc2626);
}

.cs-progress-fire {
    background: linear-gradient(90deg, #f97316, #ea580c);
}

.cs-progress-eyes {
    background: linear-gradient(90deg, #3b82f6, #2563eb);
}

.cs-progress-drool {
    background: linear-gradient(90deg, #8b5cf6, #7c3aed);
}

.cs-progress-angry {
    background: linear-gradient(90deg, #64748b, #475569);
}

/* Toast Notification */
.cs-toast {
    position: fixed;
    top: 2rem;
    right: 2rem;
    background: linear-gradient(135deg, var(--cs-primary), var(--cs-primary-dark));
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 16px;
    box-shadow: var(--cs-shadow-lg);
    font-weight: 600;
    font-size: 0.95rem;
    transform: translateY(-200px);
    /* Slide from top */
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 9999999;
    max-width: 350px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.cs-toast.cs-toast-show {
    transform: translateY(0);
    opacity: 1;
}

.cs-toast.cs-toast-error {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

.cs-toast.cs-toast-success {
    background: linear-gradient(135deg, #10b981, #059669);
}

@media (max-width: 640px) {
    .cs-toast {
        top: 1rem;
        right: 1rem;
        left: 1rem;
        bottom: auto;
        max-width: none;
    }
}

/* Loading State */
.cs-reaction-btn.cs-loading {
    pointer-events: none;
    opacity: 0.6;
}

.cs-reaction-btn.cs-loading .cs-reaction-emoji {
    animation: pulse 1s infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .cs-reactions-stats-container {
        padding: 1.5rem;
        margin: 1rem;
        border-radius: 20px;
    }

    .cs-stats-title {
        font-size: 0.9rem;
    }

    .cs-reactions-title,
    .cs-reaction-stats-title {
        font-size: 1.125rem;
    }

    .cs-stat-value {
        font-size: 1.1rem;
    }

    .cs-stat-label {
        font-size: 0.65rem;
    }
}

@media (max-width: 480px) {
    .cs-reactions-stats-container {
        padding: 1rem;
    }

    .cs-reaction-buttons {
        gap: 0.75rem;
    }

    .cs-reaction-btn {
        min-width: 100px;
        padding: 0.75rem 0.5rem;
    }
}