/* ==================== ALL YOUR COMPLETE CSS STYLES ==================== */



/* CUSTOM INLINE STYLE FOR COIN DISPLAY IN HEADER */

/* Header coin display styling */
.header-coin-display {
    display: inline-flex;
    align-items: center;
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    padding: 8px 16px;
    border-radius: 25px;
    margin-left: 15px;
    font-weight: bold;
    color: #000;
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.3);
    transition: all 0.3s ease;
    cursor: pointer;
}

.header-coin-display:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.5);
}

.header-coin-display i {
    margin-right: 6px;
    font-size: 1.1rem;
}

.header-coin-count {
    font-size: 1rem;
    margin-right: 4px;
}

@media (max-width: 768px) {
    .header-coin-display {
        padding: 6px 12px;
        font-size: 0.9rem;
    }
}


.spinner {
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top: 3px solid #ff006e;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); box-shadow: 0 4px 15px rgba(255,0,110,0.5); }
    50% { transform: scale(1.05); box-shadow: 0 6px 20px rgba(255,0,110,0.8); }
}

#adContainer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.95);
}

.video-wrapper {
    position: relative;
}

button:disabled {
    pointer-events: none;
    user-select: none;
}

#skipAdButton {
    transition: all 0.3s ease;
}

#adPlayPauseButton {
    transition: all 0.2s ease;
}

#adPlayPauseButton:hover {
    background: #ff0084 !important;
    transform: scale(1.05);
}

#adPlayPauseButton:active {
    transform: scale(0.95);
}

#adMuteToggle {
    transition: all 0.2s ease;
}

#adMuteToggle:hover {
    background: #ff0084 !important;
    transform: scale(1.05);
}

#adMuteToggle:active {
    transform: scale(0.95);
}

#closeAdButton {
    transition: all 0.2s ease;
}

#closeAdButton:hover {
    transform: scale(1.1) !important;
}

#closeAdButton:active {
    transform: scale(0.95) !important;
}

/* Main video controls transition */
.video-controls {
    transition: opacity 0.3s ease;
}

/* Video Controls Styling */
.video-controls {
    position: absolute;
    bottom: 20px;
    right: 20px;
    display: flex;
    gap: 10px;
    z-index: 100;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.video-wrapper:hover .video-controls {
    opacity: 1;
}

.control-btn {
    width: 45px;
    height: 45px;
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 1.2rem;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.control-btn:hover {
    background: rgba(255, 0, 110, 0.9);
    border-color: #ff006e;
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(255, 0, 110, 0.6);
}

.control-btn:active {
    transform: scale(0.95);
}

.control-btn i {
    pointer-events: none;
}

/* Always show controls on mobile */
@media (hover: none) {
    .video-controls {
        opacity: 0.9;
    }
}

/* Fullscreen styles */
.video-wrapper:fullscreen,
.video-wrapper:-webkit-full-screen,
.video-wrapper:-moz-full-screen,
.video-wrapper:-ms-fullscreen {
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-wrapper:fullscreen .video-player,
.video-wrapper:-webkit-full-screen .video-player,
.video-wrapper:-moz-full-screen .video-player,
.video-wrapper:-ms-fullscreen .video-player {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.video-wrapper:fullscreen .video-controls,
.video-wrapper:-webkit-full-screen .video-controls,
.video-wrapper:-moz-full-screen .video-controls,
.video-wrapper:-ms-fullscreen .video-controls {
    bottom: 30px;
    right: 30px;
}

.video-wrapper:fullscreen .stream-badges,
.video-wrapper:-webkit-full-screen .stream-badges,
.video-wrapper:-moz-full-screen .stream-badges,
.video-wrapper:-ms-fullscreen .stream-badges {
    top: 30px;
    left: 30px;
}

.video-wrapper:fullscreen .connection-quality,
.video-wrapper:-webkit-full-screen .connection-quality,
.video-wrapper:-moz-full-screen .connection-quality,
.video-wrapper:-ms-fullscreen .connection-quality {
    bottom: 30px;
    left: 30px;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .video-controls {
        bottom: 15px;
        right: 15px;
        gap: 8px;
        opacity: 0.9; /* Always visible on mobile */
    }
    
    .control-btn {
        width: 38px;
        height: 38px;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .video-controls {
        bottom: 10px;
        right: 10px;
        gap: 6px;
    }
    
    .control-btn {
        width: 35px;
        height: 35px;
        font-size: 0.9rem;
        border-width: 1px;
    }
}

/* Fix video wrapper position for controls */
.video-wrapper {
    position: relative;
}

/* Ensure controls stay above other elements */
.video-controls {
    z-index: 1000;
}

/* Smooth transitions */
.control-btn {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Pulse animation for first-time users */
@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(255, 0, 110, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(255, 0, 110, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 0, 110, 0); }
}

.video-controls.pulse .control-btn {
    animation: pulse 2s infinite;
}

/* Loading spinner */
.video-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10;
    background: rgba(0, 0, 0, 0.7);
    padding: 20px;
    border-radius: 10px;
}

.video-loading .spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ff006e;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Connection quality badge */
.connection-quality {
    position: absolute;
    bottom: 60px;
    left: 10px;
    background: rgba(0, 0, 0, 0.8);
    padding: 5px 12px;
    border-radius: 5px;
    font-size: 0.8rem;
    color: white;
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 6px;
    animation: fadeInOut 0.5s ease;
}

.connection-quality i {
    color: #28a745;
}

@keyframes fadeInOut {
    0% { opacity: 0; transform: translateY(10px); }
    100% { opacity: 1; transform: translateY(0); }
}

/* Video player background */
.video-player {
    background: #000;
    position: relative;
}

.video-player::before {
    content: 'Connecting...';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: rgba(255, 255, 255, 0.5);
    font-size: 1.2rem;
    z-index: 1;
    pointer-events: none;
}

.video-player[src]::before,
.video-player.playing::before {
    display: none;
}

/* Image upload button */
.image-upload-btn {
    background: linear-gradient(135deg, #8b5cf6, #6366f1);
    color: white;
    border: none;
    padding: 10px 14px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
    margin-right: 8px;
}

.image-upload-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.4);
}

/* Chat image message styles */
.chat-message.image-message .message-image-content {
    margin-top: 8px;
}

.chat-message.image-message .message-image-content img {
    max-width: 200px;
    max-height: 200px;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.chat-message.image-message .message-image-content img:hover {
    transform: scale(1.02);
}

/* Image preview modal */
.image-preview-modal {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.chat-input-wrapper {
    display: flex;
    gap: 8px;
    align-items: center;
}

/* Private Chat Message Styles */
.private-chat-message {
    padding: 12px 16px;
    margin-bottom: 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    animation: slideIn 0.3s ease;
}

.private-chat-message.user-message {
    background: linear-gradient(135deg, rgba(255, 0, 110, 0.2), rgba(233, 30, 99, 0.2));
    border-left: 3px solid #ff006e;
    margin-left: auto;
    max-width: 85%;
}

.private-chat-message.model-message {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.2), rgba(118, 75, 162, 0.2));
    border-left: 3px solid #667eea;
    margin-right: auto;
    max-width: 85%;
}

.private-chat-message .message-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.private-chat-message .message-username {
    font-weight: 600;
    font-size: 0.9rem;
}

.private-chat-message.user-message .message-username {
    color: #ff006e;
}

.private-chat-message.model-message .message-username {
    color: #667eea;
}

.private-chat-message .message-time {
    font-size: 0.75rem;
    color: #aaa;
}

.private-chat-message .message-content {
    color: #fff;
    font-size: 0.95rem;
    line-height: 1.4;
    word-wrap: break-word;
}

/* Private Chat Input */
.private-chat-input-wrapper {
    padding: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    gap: 10px;
    align-items: center;
    background: rgba(0, 0, 0, 0.3);
}

.private-chat-input {
    flex: 1;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: #fff;
    font-size: 0.95rem;
    outline: none;
    transition: all 0.3s;
}

.private-chat-input:focus {
    border-color: #667eea;
    background: rgba(255, 255, 255, 0.08);
}

.send-private-btn {
    padding: 12px 20px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border: none;
    border-radius: 10px;
    color: white;
    cursor: pointer;
    transition: all 0.3s;
}

.send-private-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Empty gallery state */
.no-gallery-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    margin: 20px 0;
}

.no-gallery-content h4 {
    color: #fff;
    margin: 0 0 10px 0;
    font-size: 1.3rem;
}

.no-gallery-content p {
    color: #ccc;
    margin: 5px 0;
    font-size: 0.95rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .video-loading {
        padding: 15px;
    }
    
    .video-loading .spinner {
        width: 40px;
        height: 40px;
        border-width: 3px;
    }
    
    .connection-quality {
        bottom: 50px;
        font-size: 0.7rem;
        padding: 4px 10px;
    }
    
    .message-image-content img {
        max-width: 150px;
        max-height: 150px;
    }
    
    .image-upload-btn {
        padding: 8px 12px;
        min-width: 40px;
        height: 40px;
        font-size: 0.9rem;
    }
    
    .image-preview-modal img {
        max-width: 95%;
        max-height: 95%;
    }
    
    .header-coin-display {
        padding: 6px 12px;
        font-size: 0.9rem;
        margin-left: 10px;
    }
    
    .private-chat-message {
        max-width: 95%;
    }
}

@media (max-width: 480px) {
    .message-image-content img {
        max-width: 120px;
        max-height: 120px;
    }
    
    .chat-input-wrapper {
        gap: 6px;
    }
    
    .image-upload-btn {
        padding: 6px 10px;
        min-width: 36px;
        height: 36px;
        font-size: 0.85rem;
    }
    
    .header-coin-display {
        padding: 4px 10px;
        font-size: 0.85rem;
        margin-left: 8px;
    }
}