/* ============================================
   CHAT TAB
   ============================================ */
.chat-container {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 60px);
    position: relative;
}

.chat-header {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 11px 16px;
    background: var(--light);
    border-bottom: 1px solid var(--gray);
    position: sticky;
    top: 0;
    z-index: 95;
    flex: 0 0 auto;
    overflow: visible;
}

.chat-header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* ============================================
   MATCHING TAGS PILE
   ============================================ */
.matching-tags-pile {
    background: linear-gradient(135deg, rgba(74, 144, 226, 0.1), rgba(155, 89, 182, 0.1));
    padding: 12px 16px;
    border-bottom: 1px solid var(--gray);
    animation: slideDown 0.4s ease-out;
    position: relative;
    z-index: 50; /* Below chat-header (95) so flyout can appear above */
}

@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
        padding: 0 16px;
    }
    to {
        opacity: 1;
        max-height: 100px;
        padding: 12px 16px;
    }
}

.matching-tags-pile.fade-out {
    animation: fadeOutPile 0.5s ease-out forwards;
}

@keyframes fadeOutPile {
    from {
        opacity: 1;
        max-height: 100px;
        padding: 12px 16px;
    }
    to {
        opacity: 0;
        max-height: 0;
        padding: 0 16px;
    }
}

.tags-pile-inner {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    align-items: center;
}

.pile-tag {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 13px;
    font-weight: 600;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: default;
}

/* Slight random rotations for pile effect */
.pile-tag:nth-child(odd) {
    transform: rotate(-2deg);
}

.pile-tag:nth-child(even) {
    transform: rotate(1.5deg);
}

.pile-tag:nth-child(3n) {
    transform: rotate(-1deg);
}

.pile-tag:hover {
    transform: rotate(0deg) scale(1.05);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* Matching tags - highlighted style */
.pile-tag.matching {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark, #3a7bc8));
    color: var(--white);
    box-shadow: 0 2px 6px rgba(74, 144, 226, 0.4);
}

/* Non-matching tags - muted style */
.pile-tag.non-matching {
    background: rgba(128, 128, 128, 0.15);
    color: var(--gray);
    border: 1px dashed var(--gray);
    opacity: 0.7;
}

.pile-tag.non-matching:hover {
    opacity: 0.9;
}

/* Loading state for suggested tags */
.loading-tags {
    color: var(--gray);
    font-size: 13px;
    font-style: italic;
}

.partner-info {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}

.chat-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    justify-content: space-evenly;
    overflow: visible;
}

.score-pill {
    background: var(--primary);
    color: var(--white);
    padding: 6px 16px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 16px;
    box-shadow: var(--shadow);
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--gray);
}

.status-dot.online {
    background: var(--success);
    animation: blink 1.5s infinite;
}

@keyframes blink {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.messages-container {
    flex: 1 1 auto;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 16px;
    background: linear-gradient(to bottom, #f9fafb, #ffffff);
    min-height: 0;
    -webkit-overflow-scrolling: touch;
}

.message {
    margin-bottom: 16px;
    display: flex;
    animation: slideIn 0.3s ease;
}

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

.message.sent {
    justify-content: flex-end;
}

.message-bubble {
    max-width: 70%;
    padding: 12px 16px;
    border-radius: var(--radius);
    word-wrap: break-word;
}

.message.sent .message-bubble {
    background: var(--primary);
    color: var(--white);
    border-bottom-right-radius: 4px;
}

.message.received .message-bubble {
    background: var(--light);
    color: var(--dark);
    border-bottom-left-radius: 4px;
}

.message.system .message-bubble {
    background: var(--warning);
    color: var(--white);
    margin: 0 auto;
    font-size: 14px;
}

.message-media {
    max-width: 100%;
    max-height: 300px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
}

.message-media:hover {
    transform: scale(1.05);
}

video.message-media {
    display: block;
}

.message-media-placeholder {
    max-width: 100%;
    padding: 40px 20px;
    border-radius: var(--radius-sm);
    background: var(--light);
    color: var(--dark);
    opacity: 0.6;
    text-align: center;
    font-size: 14px;
}

.typing-indicator {
    padding: 8px 16px;
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--light);
    border-radius: var(--radius-sm);
    margin: 8px 16px;
    animation: fadeIn 0.3s ease;
}

.typing-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--gray);
    animation: typingDotPulse 1.4s infinite;
}

.typing-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-dot:nth-child(3) {
    animation-delay: 0.4s;
}

.typing-text {
    font-size: 13px;
    color: var(--gray);
    margin-left: 4px;
}

@keyframes typingDotPulse {
    0%, 60%, 100% {
        opacity: 0.3;
        transform: scale(0.8);
    }
    30% {
        opacity: 1;
        transform: scale(1);
    }
}

.chat-input-container {
    display: flex;
    gap: 8px;
    padding: 16px;
    background: var(--white);
    border-top: 1px solid var(--light);
    position: sticky;
    bottom: 0;
    z-index: 95;
    flex: 0 0 auto;
}

#message-input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid var(--light);
    border-radius: var(--radius-sm);
    font-size: 16px;
    transition: var(--transition);
}

#message-input:focus {
    outline: none;
    border-color: var(--primary);
}

/* ============================================
   EXPOSED TAB
   ============================================ */
.exposed-container {
    padding: 24px;
}

.exposed-header {
    text-align: center;
    margin-bottom: 24px;
}

.exposed-header h2 {
    font-size: 28px;
    margin-bottom: 8px;
}

.exposed-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 16px;
}

.exposed-item {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: var(--transition);
}

.single-player-expose {
    box-shadow:
            0 0 10px rgba(255, 60, 0, 0.7),
            0 0 20px rgba(255, 106, 0, 0.5),
            0 0 40px rgba(255, 60, 0, 0.3);

    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.multi-player-expose {
    box-shadow:
            0 0 10px rgba(85, 255, 0, 0.7),
            0 0 20px rgba(34, 255, 0, 0.5),
            0 0 40px rgba(208, 255, 0, 0.3);

    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.exposed-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.exposed-item img,
.exposed-item video {
    width: 100%;
    height: 150px;
    object-fit: cover;
    display: block;
}

.exposed-item .timer {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.7);
    color: var(--white);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
}

/* Image Stack Styling */
.exposed-item.image-stack {
    position: relative;
}

.exposed-item.image-stack::before,
.exposed-item.image-stack::after {
    content: '';
    position: absolute;
    width: 95%;
    height: 100%;
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: var(--shadow);
    z-index: -1;
}

.exposed-item.image-stack::before {
    top: -4px;
    left: 50%;
    transform: translateX(-50%) rotate(-1deg);
}

.exposed-item.image-stack::after {
    top: -8px;
    left: 50%;
    transform: translateX(-50%) rotate(1deg);
}

.stack-count-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: var(--accent);
    color: var(--white);
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    z-index: 2;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Progressive Image Loading */
.exposed-item .media-wrapper {
    position: relative;
    width: 100%;
    height: 150px;
    background: var(--dark);
    overflow: hidden;
    border-radius: var(--radius-sm);
}

.exposed-item .media-watermark-label {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(30deg);
    color: rgba(255, 255, 255, 0.10);
    font-size: 3vh;
    font-weight: 700;
    letter-spacing: 1px;
    white-space: nowrap;
    pointer-events: none;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.10);
}

.exposed-item .media-protection-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    -webkit-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
}

/* Skeleton loading animation */
.exposed-item.loading .media-wrapper {
    background: linear-gradient(
            90deg,
            #1a1a1a 25%,
            #2d2d2d 50%,
            #1a1a1a 75%
    );
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s ease-in-out infinite;
}

@keyframes skeleton-loading {
    0% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Media elements with smooth fade-in */
.exposed-item img,
.exposed-item video {
    width: 100%;
    height: 150px;
    object-fit: cover;
    display: block;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.exposed-item img.loaded,
.exposed-item video.loaded {
    opacity: 1;
}

/* Loading placeholder */
.media-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    transition: opacity 0.3s ease-in-out;
}

.media-placeholder.hidden {
    opacity: 0;
    pointer-events: none;
}

/* Error state */
.media-error {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--white);
}

.retry-btn {
    background: var(--primary);
    color: var(--white);
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    transition: var(--transition);
}

.retry-btn:hover {
    background: var(--primary-dark);
    transform: scale(1.05);
}

.view-count-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: rgba(0, 0, 0, 0.7);
    color: var(--white);
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    z-index: 2;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Like Badge */
.like-badge {
    position: absolute;
    top: 33px;
    left: 8px;
    background: rgba(0, 0, 0, 0.7);
    color: var(--white);
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    z-index: 3;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 4px;
}

.like-badge:hover {
    background: rgba(0, 0, 0, 0.85);
    transform: scale(1.05);
}

.like-badge.liked {
    background: rgba(255, 20, 60, 0.9);
}

.like-badge.liked:hover {
    background: rgba(255, 20, 60, 1);
}

.heart-icon {
    font-size: 14px;
    line-height: 1;
}

.like-count {
    font-size: 11px;
    font-weight: 600;
    min-width: 12px;
    text-align: center;
}

.like-badge-like-part {
    display: flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
}

.like-badge-divider {
    opacity: 0.45;
    font-size: 10px;
    line-height: 1;
    margin: 0 1px;
}

.like-badge-comment-part {
    display: flex;
    align-items: center;
    gap: 3px;
    cursor: default;
}

.comment-bubble-icon {
    font-size: 12px;
    line-height: 1;
}

.like-badge-comment-count {
    font-size: 11px;
    font-weight: 600;
    min-width: 10px;
    text-align: center;
}

/* Like animation */
@keyframes heartBeat {
    0%, 100% {
        transform: scale(1);
    }
    25% {
        transform: scale(1.3);
    }
    50% {
        transform: scale(1.1);
    }
}

.like-badge.like-animation {
    animation: heartBeat 0.6s ease;
}

.nickname-badge {
    position: absolute;
    bottom: 8px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    color: var(--white);
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    z-index: 2;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.empty-state {
    text-align: center;
    padding: 48px 24px;
    color: var(--gray);
    font-size: 18px;
}

/* ============================================
   FLOATING POINTS
   ============================================ */
.floating-points {
    position: fixed;
    top: 70px;
    right: 16px;
    background: var(--white);
    border-radius: var(--radius);
    padding: 12px 16px;
    box-shadow: var(--shadow-lg);
    z-index: 90;
    min-width: 150px;
}

.points-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-weight: 600;
}

.points-item:last-child {
    margin-bottom: 0;
}

.points-value {
    color: var(--primary);
    font-size: 18px;
}





/* ============================================
   SLOT MACHINE STYLES
   ============================================ */
.slot-container {
    padding: 20px;
    max-width: 600px;
    margin: 0 auto;
}

.slot-header {
    text-align: center;
    margin-bottom: 24px;
}

.slot-header h2 {
    font-size: 28px;
    margin-bottom: 8px;
    background: linear-gradient(135deg, #f39c12, #e74c3c);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.slot-header p {
    color: var(--gray);
    font-size: 14px;
}

.slot-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}

.stat-item {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: var(--white);
    padding: 16px;
    border-radius: var(--radius);
    text-align: center;
    box-shadow: var(--shadow);
}

.stat-label {
    display: block;
    font-size: 12px;
    opacity: 0.9;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-value {
    display: block;
    font-size: 28px;
    font-weight: bold;
}

.slot-machine {
    background: linear-gradient(135deg, #2c3e50, #34495e);
    border-radius: var(--radius);
    padding: 32px 20px;
    margin-bottom: 24px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
    border: 4px solid #f39c12;
}

.slot-reels {
    display: flex;
    justify-content: center;
    gap: 8px;
}

.slot-reel {
    width: 80px;
    height: 100px;
    background: var(--white);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 4px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    position: relative;
}

.reel-symbol {
    font-size: 52px;
    line-height: 100px;
    transition: none;
    position: relative;
}

.slot-reel.spinning .reel-symbol {
    animation: slotRoll 0.15s linear infinite;
}

.slot-reel.spinning .reel-symbol::before,
.slot-reel.spinning .reel-symbol::after {
    content: '🎰';
    position: absolute;
    left: 0;
    right: 0;
    font-size: 52px;
    line-height: 100px;
    text-align: center;
}

.slot-reel.spinning .reel-symbol::before {
    top: -100px;
}

.slot-reel.spinning .reel-symbol::after {
    top: 100px;
}

@keyframes slotRoll {
    0% {
        transform: translateY(0);
    }
    100% {
        transform: translateY(100px);
    }
}

.slot-result {
    text-align: center;
    padding: 16px;
    border-radius: var(--radius);
    margin-bottom: 20px;
    font-size: 18px;
    font-weight: 600;
    animation: slideIn 0.3s ease;
}

.slot-result.win {
    background: linear-gradient(135deg, #d4edda, #c3e6cb);
    color: #155724;
    border: 2px solid #28a745;
}

.slot-result.lose {
    background: linear-gradient(135deg, #f8d7da, #f5c6cb);
    color: #721c24;
    border: 2px solid #dc3545;
}

.slot-result.punishment {
    background: linear-gradient(135deg, #fff3cd, #ffeaa7);
    color: #856404;
    border: 2px solid #ffc107;
}

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

.slot-controls {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
}

.slot-info {
    background: var(--light);
    padding: 20px;
    border-radius: var(--radius);
    margin-top: 24px;
}

.slot-info h3 {
    font-size: 18px;
    margin-bottom: 12px;
    color: var(--dark);
}

.slot-info ul {
    list-style: none;
    padding: 0;
}

.slot-info li {
    padding: 8px 0;
    padding-left: 24px;
    position: relative;
    color: var(--dark-light);
}

.slot-info li::before {
    content: "🎰";
    position: absolute;
    left: 0;
}

/* Slot Machine Setup Modal */
.setup-section {
    margin-bottom: 24px;
}

.setup-section label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--dark);
}

.setup-section small {
    display: block;
    color: var(--gray);
    font-size: 12px;
    margin-top: 4px;
}

.setup-section .input-field {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: var(--radius-sm);
    font-size: 16px;
}

.setup-section .slider {
    width: calc(100% - 60px);
    margin-right: 12px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 8px;
    border-radius: var(--radius-sm);
    transition: background 0.2s;
}

.checkbox-label:hover {
    background: var(--light);
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.dare-categories {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 8px;
}

/* ============================================
   REPORT BUTTON (on gallery stack cards)
   ============================================ */
.report-btn {
    position: absolute;
    top: 58px;
    left: 8px;
    background: rgba(180, 20, 20, 0.85);
    color: #fff;
    border: none;
    padding: 3px 7px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 700;
    cursor: pointer;
    z-index: 4;
    letter-spacing: 0.4px;
    transition: background 0.15s, transform 0.15s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    line-height: 1.4;
}

.report-btn:hover {
    background: rgba(220, 30, 30, 1);
    transform: scale(1.08);
}

/* ============================================
   IN-REVIEW BLUR STATE
   ============================================ */
.exposed-item.in-review img,
.exposed-item.in-review video {
    filter: blur(16px);
}

.in-review-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 3;
    pointer-events: none;
    gap: 4px;
}

.in-review-icon {
    font-size: 28px;
    line-height: 1;
}

.in-review-label {
    font-size: 10px;
    font-weight: 700;
    color: #fff;
    background: rgba(180, 20, 20, 0.8);
    padding: 3px 8px;
    border-radius: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ============================================
   REPORT MODAL (red-themed)
   ============================================ */
.report-modal-content {
    max-width: 480px;
    width: 92%;
    border-top: 4px solid var(--danger, #ef4444);
}

.report-modal-title {
    color: var(--danger, #ef4444);
    margin-bottom: 6px;
    font-size: 20px;
}

.report-modal-subtitle {
    color: var(--gray, #888);
    font-size: 13px;
    margin-bottom: 16px;
    line-height: 1.4;
}

.report-reasons {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
}

.report-reason-option {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    padding: 10px 12px;
    border-radius: var(--radius-sm, 6px);
    border: 1px solid var(--border, #333);
    transition: border-color 0.15s, background 0.15s;
    font-size: 14px;
    line-height: 1.4;
}

.report-reason-option:hover {
    border-color: var(--danger, #ef4444);
    background: rgba(239, 68, 68, 0.06);
}

.report-reason-option input[type="radio"] {
    margin-top: 2px;
    accent-color: var(--danger, #ef4444);
    flex-shrink: 0;
    cursor: pointer;
}

.report-modal-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.report-error-msg {
    margin-top: 12px;
    padding: 8px 12px;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid var(--danger, #ef4444);
    border-radius: var(--radius-sm, 6px);
    color: var(--danger, #ef4444);
    font-size: 13px;
}

.report-details-section {
    margin-bottom: 16px;
}

.report-admin-notice {
    margin-top: 10px;
    padding: 8px 12px;
    background: rgba(148, 163, 184, 0.12);
    border: 1px solid var(--gray, #888);
    border-radius: var(--radius-sm, 6px);
    color: var(--gray, #888);
    font-size: 12px;
    line-height: 1.4;
}
