/* Co-Echo Stories - Frontend Styles */

/* Stories Container */
.co-echo-stories-container {
    padding: 1rem 1rem 0.1rem 1rem;
    border-bottom: 1px solid var(--border-color);
    background: var(--background-color);
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.co-echo-stories-container::-webkit-scrollbar {
    display: none;
}

.co-echo-stories-scroll {
    display: flex;
    gap: 0.75rem;
    padding-bottom: 0.5rem;
}

/* Story Item */
.co-echo-story-item {
    position: relative;
    min-width: 55px;
    width: 55px;
    height: 70px;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.co-echo-story-item:hover {
    transform: scale(1.05);
}

.co-echo-story-avatar {
    width: 55px;
    height: 55px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--primary-color);
    transition: all 0.3s ease;
}

.co-echo-story-avatar.viewed {
    border-color: #ccc;
    opacity: 0.6;
}

.co-echo-story-avatar.live {
    border-color: #e74c3c;
    animation: pulse-live 1.5s infinite;
}

.co-echo-story-avatar.space {
    border-color: #8B5CF6;
    animation: pulse-space 1.5s infinite;
}

@keyframes pulse-live {
    0% { box-shadow: 0 0 0 0 rgba(231, 76, 60, 0.7); }
    70% { box-shadow: 0 0 0 8px rgba(231, 76, 60, 0); }
    100% { box-shadow: 0 0 0 0 rgba(231, 76, 60, 0); }
}

@keyframes pulse-space {
    0% { box-shadow: 0 0 0 0 rgba(139, 92, 246, 0.7); }
    70% { box-shadow: 0 0 0 8px rgba(139, 92, 246, 0); }
    100% { box-shadow: 0 0 0 0 rgba(139, 92, 246, 0); }
}

.co-echo-story-avatar.expired {
    border-color: #ccc;
    opacity: 0.4;
    filter: grayscale(100%);
}

.co-echo-story-live-indicator {
    position: absolute;
    top: -2px;
    right: -2px;
    background: #e74c3c;
    color: white;
    font-size: 0.6rem;
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: bold;
    border: 2px solid white;
    text-transform: uppercase;
}

.co-echo-story-space-indicator {
    position: absolute;
    top: -2px;
    right: -2px;
    background: #8B5CF6;
    color: white;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 50%;
    font-weight: bold;
    border: 2px solid white;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
}

.co-echo-stories-container { 
    padding-top: 5px;
    border-bottom: solid 1px rgba(0, 0, 0, 0.08); 
}

.co-echo-story-add {
    width: 55px;
    height: 55px;
    border-radius: 50%;
    background: #f0f0f0;
    border: 2px dashed #ccc;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    font-size: 2rem;
    transition: all 0.2s ease;
}

.co-echo-story-add:hover {
    background: #e0e0e0;
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.co-echo-story-user-info {
    position: absolute;
    bottom: -0.5rem;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    width: 60px;
}

.co-echo-story-username {
    font-size: 0.65rem;
    color: (--text-color-light);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: -1.25rem;
}

.co-echo-story-indicator {
    position: absolute;
    top: -2px;
    right: -9px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
}

/* Space Modal */
.co-echo-space-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
}

.co-echo-space-modal.active {
    display: flex;
}

.co-echo-space-viewer {
    position: relative;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    overflow-y: auto;
    user-select: none;
    color: white;
}

.co-echo-space-header {
    padding: 1.5rem 1.5rem 1rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.co-echo-space-title-section h3 {
    margin: 0;
    font-size: 1.4rem;
    font-weight: 700;
    line-height: 1.2;
    color: white;
}

.co-echo-space-description {
    margin: 0.5rem 0 0 0;
    font-size: 0.9rem;
    opacity: 0.8;
    line-height: 1.3;
}

.co-echo-space-info {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.5rem;
}

.co-echo-space-participant-count {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
    backdrop-filter: blur(10px);
}

.co-echo-space-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.3rem;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    backdrop-filter: blur(10px);
}

.co-echo-space-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.co-echo-space-host-section,
.co-echo-space-speakers-section,
.co-echo-space-listeners-section {
    padding: 0.5rem 0.5rem;
}

.co-echo-space-host-section h4,
.co-echo-space-speakers-section h4,
.co-echo-space-listeners-section h4 {
    margin: 0 0 1rem 0;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.9;
}

.co-echo-space-speakers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.co-echo-space-listeners-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* Space Advertisement Areas */
.co-echo-space-ad-slot {
    margin: 0.5rem 0.5rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    text-align: center;
}

.co-echo-space-ad-slot.host-ad {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 0;
}

.co-echo-space-ad-slot.listeners-ad {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 0;
}

.co-echo-space-ad-slot:empty {
    display: none;
}

.co-echo-space-ad-slot iframe,
.co-echo-space-ad-slot img,
.co-echo-space-ad-slot video {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

/* Space Participant Cards */
.co-echo-space-participant-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    transition: all 0.3s ease;
    cursor: pointer;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.co-echo-space-participant-card:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

.co-echo-space-participant-card.host {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.co-echo-space-participant-card.speaker {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.co-echo-space-participant-card.listener {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0.5rem;
    flex-direction: row;
    text-align: left;
    margin-bottom: 0.5rem;
}

.co-echo-space-participant-avatar-container {
    position: relative;
    margin-bottom: 0.5rem;
}

.co-echo-space-participant-card.listener .co-echo-space-participant-avatar-container {
    margin-bottom: 0;
    margin-right: 0.75rem;
}

.co-echo-space-participant-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.co-echo-space-participant-card.listener .co-echo-space-participant-avatar {
    width: 35px;
    height: 35px;
}

/* Audio Indicator */
.co-echo-space-audio-indicator {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #ccc;
    border: 2px solid white;
    display: flex;
    align-items: center;
    justify-content: center;
}

.co-echo-space-audio-indicator.active {
    background: #10B981;
    animation: audio-pulse 1.5s infinite;
}

.co-echo-space-audio-indicator.active::before {
    content: '';
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
    animation: audio-wave 1s infinite alternate;
}

@keyframes audio-pulse {
    0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
    70% { box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
    100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

@keyframes audio-wave {
    0% { transform: scale(0.8); }
    100% { transform: scale(1.2); }
}

.co-echo-space-participant-info {
    flex: 1;
}

.co-echo-space-participant-name {
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 0.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
}

.co-echo-space-participant-card.listener .co-echo-space-participant-name {
    justify-content: flex-start;
    font-size: 0.85rem;
}

.co-echo-space-participant-role {
    font-size: 0.7rem;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.co-echo-space-speak-request {
    font-size: 0.7rem;
    background: rgba(251, 191, 36, 0.8);
    padding: 0.2rem 0.5rem;
    border-radius: 10px;
    margin-top: 0.3rem;
    font-weight: 500;
}

.co-echo-space-more-listeners {
    text-align: center;
    font-size: 0.8rem;
    opacity: 0.7;
    margin-top: 0.5rem;
    font-style: italic;
}

/* Speaker Request Management */
.co-echo-space-pending-requests {
    padding: 1rem 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.co-echo-space-pending-requests h4 {
    margin: 0 0 1rem 0;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.9;
    color: #FBB034;
}

.co-echo-space-request-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem;
    background: rgba(251, 191, 36, 0.1);
    border-radius: 8px;
    margin-bottom: 0.5rem;
    border: 1px solid rgba(251, 191, 36, 0.3);
}

.co-echo-space-request-user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.co-echo-space-request-avatar {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.co-echo-space-request-name {
    font-size: 0.85rem;
    font-weight: 600;
}

.co-echo-space-request-actions {
    display: flex;
    gap: 0.5rem;
}

.co-echo-space-request-approve,
.co-echo-space-request-deny {
    padding: 0.3rem 0.75rem;
    border: none;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.co-echo-space-request-approve {
    background: rgba(16, 185, 129, 0.8);
    color: white;
}

.co-echo-space-request-approve:hover {
    background: rgba(16, 185, 129, 1);
    transform: translateY(-1px);
}

.co-echo-space-request-deny {
    background: rgba(239, 68, 68, 0.8);
    color: white;
}

.co-echo-space-request-deny:hover {
    background: rgba(239, 68, 68, 1);
    transform: translateY(-1px);
}

/* Speaker Management Controls */
.co-echo-space-speaker-controls {
    margin-top: 0.5rem;
    display: flex;
    gap: 0.5rem;
    justify-content: center;
}

.co-echo-space-remove-speaker {
    padding: 0.25rem 0.5rem;
    background: rgba(239, 68, 68, 0.8);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.co-echo-space-remove-speaker:hover {
    background: rgba(239, 68, 68, 1);
    transform: translateY(-1px);
}

/* Space Comments */
.co-echo-space-comments {
    padding: 1rem 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    max-height: 200px;
    overflow-y: auto;
}

.co-echo-space-comments h4 {
    margin: 0 0 1rem 0;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.9;
}

.co-echo-space-comments::-webkit-scrollbar {
    width: 4px;
}

.co-echo-space-comments::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.1);
    border-radius: 2px;
}

.co-echo-space-comments::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.4);
    border-radius: 2px;
}

.co-echo-space-comment {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    padding: 8px 12px;
    border-radius: 16px;
    margin-bottom: 6px;
    font-size: 0.85rem;
    word-wrap: break-word;
    animation: slideInComment 0.3s ease-out;
    backdrop-filter: blur(10px);
}

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

.co-echo-space-comment.host {
    background: rgba(139, 92, 246, 0.3);
    border-left: 3px solid #8B5CF6;
}

.co-echo-space-comment.speaker {
    background: rgba(16, 185, 129, 0.2);
    border-left: 3px solid #10B981;
}

.co-echo-space-comment-user {
    font-weight: bold;
    color: #00ba7b;
    margin-right: 6px;
}

.co-echo-space-comment.host .co-echo-space-comment-user {
    color: #DDD6FE;
}

.co-echo-space-comment.speaker .co-echo-space-comment-user {
    color: #A7F3D0;
}

.co-echo-space-comment-input-container {
    padding: 1rem 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    gap: 8px;
    background: rgba(0, 0, 0, 0.2);
}

.co-echo-space-comment-input {
    flex: 1;
    background: rgba(255,255,255,0.9);
    border: none;
    border-radius: 20px;
    padding: 10px 15px;
    font-size: 0.9rem;
    outline: none;
    color: #333;
}

.co-echo-space-comment-input::placeholder {
    color: #666;
}

.co-echo-space-comment-send {
    background: #8B5CF6;
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.1rem;
    transition: all 0.2s ease;
}

.co-echo-space-comment-send:hover {
    background: #7C3AED;
    transform: scale(1.05);
}

.co-echo-space-comment-send:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

/* Space Controls */
.co-echo-space-controls {
    padding: 1.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
}

.co-echo-space-controls button {
    padding: 0.6rem 1.2rem;
    border: none;
    border-radius: 25px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    backdrop-filter: blur(10px);
    flex: 1;
    min-width: 120px;
    max-width: 200px;
}

/* Host Controls */
.co-echo-space-mute-all {
    background: rgba(249, 115, 22, 0.8);
    color: white;
    border: 1px solid rgba(249, 115, 22, 0.5);
}

.co-echo-space-mute-all:hover {
    background: rgba(249, 115, 22, 1);
    transform: translateY(-1px);
}

.co-echo-space-end {
    background: rgba(239, 68, 68, 0.8);
    color: white;
    border: 1px solid rgba(239, 68, 68, 0.5);
}

.co-echo-space-end:hover {
    background: rgba(239, 68, 68, 1);
    transform: translateY(-1px);
}

/* Speaker Controls */
.co-echo-space-mute-self {
    background: rgba(156, 163, 175, 0.8);
    color: white;
    border: 1px solid rgba(156, 163, 175, 0.5);
}

.co-echo-space-mute-self:hover,
.co-echo-space-mute-self.muted {
    background: rgba(239, 68, 68, 0.8);
    border-color: rgba(239, 68, 68, 0.5);
}

.co-echo-space-leave-speaking {
    background: rgba(107, 114, 128, 0.8);
    color: white;
    border: 1px solid rgba(107, 114, 128, 0.5);
}

.co-echo-space-leave-speaking:hover {
    background: rgba(107, 114, 128, 1);
    transform: translateY(-1px);
}

/* Listener Controls */
.co-echo-space-request-speak {
    background: rgba(59, 130, 246, 0.8);
    color: white;
    border: 1px solid rgba(59, 130, 246, 0.5);
}

.co-echo-space-request-speak:hover {
    background: rgba(59, 130, 246, 1);
    transform: translateY(-1px);
}

.co-echo-space-request-speak:disabled,
.co-echo-space-request-speak.requested {
    background: rgba(251, 191, 36, 0.8);
    border-color: rgba(251, 191, 36, 0.5);
    cursor: not-allowed;
}

.co-echo-space-leave {
    background: rgba(107, 114, 128, 0.8);
    color: white;
    border: 1px solid rgba(107, 114, 128, 0.5);
}

.co-echo-space-leave:hover {
    background: rgba(107, 114, 128, 1);
    transform: translateY(-1px);
}

/* Space Creation Form */
.co-echo-story-space-form {
    margin-bottom: 1rem;
}

.co-echo-story-space-title-input,
.co-echo-story-space-description-input {
	color: var(--text-color);
	background-color: var(--background-color); 
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    box-sizing: border-box;
    transition: all 0.2s ease;
}

.co-echo-story-space-title-input:focus,
.co-echo-story-space-description-input:focus {
    border-color: #8B5CF6;
    box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.1);
    outline: none;
}

.co-echo-story-space-description-input {
    resize: vertical;
    min-height: 60px;
}

.co-echo-story-space-settings {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding: 0.75rem;
    background: var(--background-color);
	color: var(--text-color);
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.co-echo-story-space-setting {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
}

.co-echo-story-space-max-speakers {
    padding: 0.3rem 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.85rem;
}

/* Space Upload Option */
.co-echo-story-upload-option.space {
    border-color: #8B5CF6;
    background: rgba(139, 92, 246, 0.05);
}

.co-echo-story-upload-option.space:hover,
.co-echo-story-upload-option.space.active {
    border-color: #8B5CF6;
    background: rgba(139, 92, 246, 0.1);
}

.co-echo-story-upload-option.space .co-echo-story-upload-option-icon {
    color: #8B5CF6;
}

.co-echo-story-submit.space {
    background: #8B5CF6;
}

.co-echo-story-submit.space:hover {
    background: #7C3AED;
}

.co-echo-story-submit.space:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Story Viewer Modal */
.co-echo-story-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
}

.co-echo-story-modal.active {
    display: flex;
}

.co-echo-story-viewer {
    position: relative;
    max-width: 400px;
    width: 100%;
    max-height: 95vh;
    background: #000;
	border-radius: 8px;
    overflow: hidden;
    user-select: none;
}

.co-echo-story-header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.7), transparent);
    color: white;
    padding: 0.2rem 1rem;
    z-index: 15;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.co-echo-story-progress {
    position: absolute;
    top: 8px;
    left: 1rem;
    right: 1rem;
    height: 3px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    overflow: hidden;
    z-index: 20;
}

.co-echo-story-progress-bar {
    height: 100%;
    background: white;
    width: 0%;
    transition: width 0.1s linear;
    border-radius: 2px;
}

.co-echo-story-live-progress {
    background: #e74c3c;
    animation: live-pulse 2s infinite;
}

@keyframes live-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

.co-echo-story-user {
    display: flex;
    align-items: center;
    margin-top: 1.5rem;
}

.co-echo-story-user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 0.5rem;
    margin-top: -12px;
    object-fit: cover;
}

.co-echo-story-user-details h4 {
	cursor: pointer;
    margin: 0;
    margin-top: -12px;
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.co-echo-story-verified-badge {
    width: 14px;
    height: 14px;
    color: var(--primary-color);
}

.co-echo-story-user-details span {
    font-size: 0.5rem;
    opacity: 0.8;
    display: block;
}

.co-echo-story-live-badge {
    background: #e74c3c;
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: bold;
    text-transform: uppercase;
    margin-left: 0.5rem;
}

.co-echo-story-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.co-echo-story-delete-btn,
.co-echo-story-end-live-btn {
    background: rgba(231, 76, 60, 0.8);
    border: none;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.co-echo-story-delete-btn:hover,
.co-echo-story-end-live-btn:hover {
    background: rgba(231, 76, 60, 1);
}

.co-echo-story-close {
    background: #e74c3c;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.1rem;
    border-radius: 50%;
    width: 25px;
    height: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 20;
}

.co-echo-story-close:hover {
    background: rgba(255, 255, 255, 0.1);
}

.co-echo-story-content {
    position: relative;
    width: 100%;
    height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.co-echo-story-live-content {
    width: 100%;
    height: 100%;
    background: #000;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

#local-video-player, #remote-video-player {
    width: 100%;
    height: 100%;
}

.co-echo-story-live-video video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.co-echo-story-live-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    text-align: center;
    padding: 0.1rem;
}

.co-echo-story-live-loading {
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.co-echo-story-live-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
    margin-bottom: 1rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Live Comments */
.co-echo-story-live-comments {
    position: absolute;
    bottom: 170px;
    left: 10px;
    right: 10px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 10;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    border-radius: 8px;
    padding: 10px;
}

.co-echo-story-live-comments::-webkit-scrollbar {
    width: 4px;
}

.co-echo-story-live-comments::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.1);
    border-radius: 2px;
}

.co-echo-story-live-comments::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.4);
    border-radius: 2px;
}

.co-echo-story-live-comment {
    background: rgba(0,0,0,0.6);
    color: white;
    padding: 8px 12px;
    border-radius: 16px;
    margin-bottom: 6px;
    font-size: 0.85rem;
    word-wrap: break-word;
    animation: slideInComment 0.3s ease-out;
}

.co-echo-story-live-comment.streamer {
    background: rgba(231, 76, 60, 0.8);
    border-left: 3px solid #e74c3c;
}

.co-echo-story-live-comment-user {
    font-weight: bold;
    color: #00ba7b;
    margin-right: 6px;
}

.co-echo-story-live-comment.streamer .co-echo-story-live-comment-user {
    color: #fff;
}

.co-echo-story-live-comment-input-container {
    position: absolute;
    bottom: 120px;
    left: 10px;
    right: 10px;
    display: flex;
    gap: 8px;
    z-index: 11;
    background: rgba(0,0,0,0.7);
    padding: 10px;
    border-radius: 25px;
}

.co-echo-story-live-comment-input {
    flex: 1;
    background: rgba(255,255,255,0.9);
    border: none;
    border-radius: 20px;
    padding: 10px 15px;
    font-size: 0.9rem;
    outline: none;
    color: #333;
}

.co-echo-story-live-comment-input::placeholder {
    color: #666;
}

.co-echo-story-live-comment-send {
    background: #00ba7b;
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.1rem;
    transition: all 0.2s ease;
}

.co-echo-story-live-comment-send:hover {
    background: #009a65;
    transform: scale(1.05);
}

.co-echo-story-live-comment-send:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

/* Live Stream Duration */
.co-echo-story-live-duration {
    position: absolute;
    top: 60px;
    left: 1rem;
    background: rgba(231, 76, 60, 0.9);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: bold;
    font-family: monospace;
    z-index: 16;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Live Stream Ads */
.co-echo-story-live-ad-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 50;
    flex-direction: column;
}

.co-echo-story-live-ad-overlay.active {
    display: flex;
}

.co-echo-story-live-ad-countdown {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 49;
    flex-direction: column;
    color: white;
}

.co-echo-story-live-ad-countdown.active {
    display: flex;
}

.co-echo-story-live-ad-countdown-number {
    margin-top: -120px;
    font-size: 4rem;
    font-weight: bold;
    color: #e74c3c;
    margin-bottom: 1rem;
    animation: countdownPulse 1s ease-in-out;
}

@keyframes countdownPulse {
    0% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.2); opacity: 1; }
    100% { transform: scale(1); opacity: 0.5; }
}

.co-echo-story-live-ad-countdown-text {
    margin-top: -120px;
    font-size: 1.2rem;
    text-align: center;
    opacity: 0.8;
}

.co-echo-story-live-ad-content {
    background: white;
    border-radius: 12px;
    padding: 20px;
    max-width: 90%;
    max-height: 50%;
    overflow: auto;
    position: relative;
    text-align: center;
}

.co-echo-story-live-ad-close {
    position: absolute;
    top: 2px;
    right: 2px;
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    cursor: pointer;
    font-size: 0.9rem;
    display: none;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.co-echo-story-live-ad-close.visible {
    display: flex;
}

.co-echo-story-live-ad-close:hover {
    background: #c0392b;
    transform: scale(1.1);
}

.co-echo-story-live-ad-timer {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 0.8rem;
}

.co-echo-story-media {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.co-echo-story-video-container {
    position: relative;
    width: 100%;
    height: 100%;
}

.co-echo-story-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.co-echo-story-video-controls {
    position: absolute;
    top: 50%;
    right: 1rem;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    z-index: 10;
}

.co-echo-story-mute-btn {
    margin-top: 670%;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    color: white;
    padding: 0.5rem;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1rem;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.co-echo-story-mute-btn:hover {
    background: rgba(0, 0, 0, 0.7);
}

.co-echo-story-text-content {
    position: absolute;
    bottom: 8rem;
    left: 1rem;
    right: 1rem;
    color: white;
    text-align: center;
    font-size: 1.1rem;
    border-radius: 10px;
    background-color: rgba(0, 0, 0, 0.7);
    text-shadow: 2px 2px 4px rgba(0,0,0,0.7);
    z-index: 5;
}

.co-echo-story-text-only {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: 1.5rem;
    font-weight: 600;
    padding: 2rem;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    color: white;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.co-echo-story-actions {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
    color: white;
    padding: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 15;
}

.co-echo-story-reactions {
    display: flex;
    gap: 0.5rem;
}

.co-echo-story-reaction {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    padding: 0.5rem;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.co-echo-story-reaction:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.co-echo-story-reaction.active {
    background: var(--primary-color);
}

.co-echo-story-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.85rem;
    opacity: 0.9;
}

.co-echo-story-views,
.co-echo-story-reactions-count,
.co-echo-story-live-viewers {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.co-echo-story-views:hover,
.co-echo-story-reactions-count:hover,
.co-echo-story-live-viewers:hover {
    background: rgba(255, 255, 255, 0.1);
}

.co-echo-story-live-viewers {
    background: rgba(231, 76, 60, 0.8);
    border-radius: 12px;
    padding: 0.25rem 0.2rem;
    font-weight: bold;
}

/* Story Upload Modal */
.co-echo-story-upload-modal {
    background-color: rgba(0, 0, 0, 0.5);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
}

.co-echo-story-upload-modal.active {
    display: flex;
}

.co-echo-story-upload-content {
    background: var(--modal-background-color);
	box-shadow: 0 -2px 10px var(--box-shadow-color);
    border-top-left-radius: 16px;
    border-top-right-radius: 16px;
    padding: 2rem;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: fixed;
    bottom: 0;
    z-index: 10001;
}

.co-echo-story-upload-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.co-echo-story-upload-title {
    font-size: 1.25rem;
    font-weight: 600;
}

.co-echo-story-upload-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
}

.co-echo-story-upload-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.co-echo-story-upload-option {
    padding: 1.5rem 1rem;
    border: 2px dashed #ddd;
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    background: var(--background-color);
}

.co-echo-story-upload-option:hover {
    border-color: var(--primary-color);
    background: rgba(0, 186, 123, 0.05);
}

.co-echo-story-upload-option.active {
    border-color: var(--primary-color);
    background: rgba(0, 186, 123, 0.1);
}

.co-echo-story-upload-option.live {
    border-color: #e74c3c;
    background: rgba(231, 76, 60, 0.05);
}

.co-echo-story-upload-option.live:hover,
.co-echo-story-upload-option.live.active {
    border-color: #e74c3c;
    background: rgba(231, 76, 60, 0.1);
}

.co-echo-story-upload-option-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.co-echo-story-upload-option.live .co-echo-story-upload-option-icon {
    color: #e74c3c;
}

.co-echo-story-upload-form {
    display: none;
}

.co-echo-story-upload-form.active {
    display: block;
}

/* Live Stream Form */
.co-echo-story-live-form {
    text-align: center;
}

.co-echo-story-live-preview {
    width: 100%;
    height: 200px;
    background: #000;
    border-radius: 8px;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1rem;
    position: relative;
    overflow: hidden;
}

.co-echo-story-live-preview video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

.co-echo-story-live-title-input {
	background-color: var(--background-color);
	color: var(--text-color);
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    box-sizing: border-box;
}

.co-echo-story-live-settings {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding: 0.75rem;
    background: var(--background-color);
	color: var(--text-color);
    border-radius: 8px;
}

.co-echo-story-live-setting {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
}

.co-echo-story-text-form {
    margin-bottom: 1rem;
}

.co-echo-story-text-input {
	background-color: var(--background-color);
	color: var(--text-color);
    width: 100%;
    min-height: 100px;
    padding: 1rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    resize: vertical;
    margin-bottom: 1rem;
    box-sizing: border-box;
}

.co-echo-story-color-options {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.co-echo-story-color-option {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 3px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.co-echo-story-color-option.active {
    border-color: #333;
    transform: scale(1.1);
}

.co-echo-story-media-form input[type="file"] {
    display: none;
}

.co-echo-story-caption-input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    resize: none;
    height: 60px;
    box-sizing: border-box;
}

.co-echo-story-file-drop {
    border: 2px dashed #ddd;
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    margin-bottom: 1rem;
    transition: all 0.2s ease;
    cursor: pointer;
}

.co-echo-story-file-drop.dragover {
    border-color: var(--primary-color);
    background: rgba(0, 186, 123, 0.05);
}

.co-echo-story-preview {
    margin-bottom: 1rem;
    text-align: center;
}

.co-echo-story-preview img,
.co-echo-story-preview video {
    max-width: 100%;
    max-height: 200px;
    border-radius: 8px;
}

.co-echo-story-submit {
    width: 100%;
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.75rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.co-echo-story-submit.live {
    background: #e74c3c;
}

.co-echo-story-submit:hover {
    background: #009a68;
}

.co-echo-story-submit.live:hover {
    background: #c0392b;
}

.co-echo-story-submit:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Story Viewers Modal */
.co-echo-story-viewers-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10001;
    display: none;
    align-items: center;
    justify-content: center;
}

.co-echo-story-viewers-modal.active {
    display: flex;
}

.co-echo-story-viewers-content {
    position: fixed;
    border-top-right-radius: 16px;
    border-top-left-radius: 16px;
    bottom: 0;
    background: var(--background-color);
    padding: 1.5rem;
    max-width: 400px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}

.co-echo-story-viewers-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #eee;
}

.co-echo-story-viewers-title {
	color: var(--text-color);
    font-size: 1.1rem;
    font-weight: 600;
}

.co-echo-story-viewers-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
}

.co-echo-story-viewers-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.co-echo-story-viewer-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem;
    border-radius: 8px;
    transition: background-color 0.2s ease;
}

.co-echo-story-viewer-item:hover {
    background: #f5f5f5;
}

.co-echo-story-viewer-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    position: relative;
}

.co-echo-story-viewer-reaction {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    border: 1px solid #ddd;
}

.co-echo-story-viewer-live-indicator {
    position: absolute;
    top: -2px;
    right: -2px;
    background: #e74c3c;
    color: white;
    font-size: 0.6rem;
    padding: 1px 4px;
    border-radius: 8px;
    font-weight: bold;
    text-transform: uppercase;
    border: 1px solid white;
}

.co-echo-story-viewer-info {
    flex: 1;
}

.co-echo-story-viewer-name {
	color: var(--text-color);
    font-weight: 600;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.co-echo-story-viewer-username {
    font-size: 0.8rem;
    color: #666;
}

/* Navigation */
.co-echo-story-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: all 0.2s ease;
    z-index: 15;
}

.co-echo-story-nav:hover {
    background: rgba(0, 0, 0, 0.7);
}

.co-echo-story-nav-prev {
    left: 1rem;
}

.co-echo-story-nav-next {
    right: 1rem;
}

/* Hide navigation for live streams */
.co-echo-story-viewer.live-stream .co-echo-story-nav {
    display: none;
}

/* Paused state */
.co-echo-story-viewer.paused .co-echo-story-progress-bar {
    animation-play-state: paused;
}

/* Mobile optimizations */
@media (max-width: 768px) {
    .co-echo-space-viewer {
        margin-bottom: -6%;
        width: 100%;
        max-width: none;
        height: 95%;
        max-height: none;
        border-top-left-radius: 20px !important;
        border-top-right-radius: 20px !important;
        border-bottom-left-radius: 0;
        border-bottom-right-radius: 0;
    }
}
    
    .co-echo-story-content {
        height: 100vh;
    }
    
    .co-echo-story-upload-content {
        width: 95%;
        padding: 1rem;
    }
    
    .co-echo-story-upload-options {
        grid-template-columns: 1fr;
    }

    .co-echo-space-viewer {
        width: 100%;
        height: 100%;
        max-height: none;
        border-radius: 0;
    }

    .co-echo-space-controls {
        padding: 1rem;
        gap: 0.5rem;
    }

    .co-echo-space-controls button {
        min-width: 100px;
        font-size: 0.8rem;
        padding: 0.5rem 1rem;
    }

    .co-echo-space-speakers-grid {
        grid-template-columns: repeat(auto-fit, minmax(70px, 1fr));
        gap: 0.75rem;
    }

    .co-echo-space-participant-avatar {
        width: 40px;
        height: 40px;
    }

    .co-echo-space-participant-name {
        font-size: 0.75rem;
    }

    .co-echo-space-header {
        padding: 1rem;
    }

    .co-echo-space-title-section h3 {
        font-size: 1.2rem;
    }
}

@media screen and (min-width: 768px) {
    .co-echo-story-content {
        height: 700px;
    }
}

/* Admin-specific styles */
.co-echo-live-badge {
    color: #e74c3c;
    font-weight: bold;
    background: rgba(231, 76, 60, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.8rem;
}

.co-echo-media-badge {
    background: rgba(0, 186, 123, 0.1);
    color: var(--primary-color);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: bold;
}

.co-echo-text-badge {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: bold;
}

.co-echo-space-badge {
    background: rgba(139, 92, 246, 0.1);
    color: #8B5CF6;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: bold;
    text-transform: uppercase;
}

.co-echo-status-live {
    color: #e74c3c;
    font-weight: bold;
}

.co-echo-status-expired {
    color: #999;
}

.co-echo-status-active {
    color: #28a745;
    font-weight: bold;
}

.co-echo-status-ended {
    color: #666;
}

.co-echo-status-space-active {
    color: #8B5CF6;
    font-weight: bold;
    text-transform: uppercase;
}

/* Statistics Dashboard */
.co-echo-stats-dashboard {
    margin-bottom: 2rem;
}

.co-echo-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.co-echo-stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    text-align: center;
}

.co-echo-stat-card h3 {
    margin: 0 0 0.5rem 0;
    font-size: 0.9rem;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.co-echo-stat-number {
    font-size: 2rem;
    font-weight: bold;
    color: #333;
}

.co-echo-stat-number.co-echo-stat-live {
    color: #e74c3c;
}

.co-echo-stat-number.co-echo-stat-space {
    color: #8B5CF6;
}

/* Settings Tabs */
.co-echo-settings-tabs .nav-tab-wrapper {
    margin-bottom: 0;
    border-bottom: 1px solid #ccc;
}

.co-echo-tab-content {
    background: white;
    padding: 1.5rem;
    border: 1px solid #ccc;
    border-top: none;
}

/* Utility classes */
.modal-open {
    overflow: hidden;
}

/* Focus and accessibility */
.co-echo-story-reaction:focus,
.co-echo-story-nav:focus,
.co-echo-story-close:focus,
.co-echo-space-close:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.co-echo-space-controls button:focus {
    outline: 2px solid rgba(255, 255, 255, 0.5);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .co-echo-story-avatar {
        border-width: 4px;
    }
    
    .co-echo-story-progress-bar {
        background: #000;
    }
    
    .co-echo-story-modal,
    .co-echo-space-modal {
        background: rgba(0, 0, 0, 0.95);
    }

    .co-echo-space-participant-card {
        border-width: 2px;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .co-echo-story-item,
    .co-echo-story-reaction,
    .co-echo-story-nav,
    .co-echo-story-upload-option,
    .co-echo-space-participant-card {
        transition: none;
    }
    
    .co-echo-story-avatar.live,
    .co-echo-story-avatar.space {
        animation: none;
    }
    
    .co-echo-story-live-spinner {
        animation: none;
    }
    
    .co-echo-story-live-progress {
        animation: none;
    }

    .co-echo-space-audio-indicator.active {
        animation: none;
    }

    .co-echo-space-audio-indicator.active::before {
        animation: none;
    }
}
/* --- Live Sessions Grid Styles (with Animations) --- */
.co-echo-sessions-section {
    padding: 1rem 0;
    margin: 0 0 15px 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.co-echo-sessions-section h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-top: 0;
    margin-bottom: 1rem;
    color: var(--text-color-light);
}

.co-echo-sessions-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 7px;
}

.co-echo-session-item {
    height: 200px;
    border-radius: 10px;
    position: relative;
    overflow: hidden;
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 12px;
    box-shadow: inset 0 -80px 60px -30px rgba(0,0,0,0.7);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.co-echo-session-item:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: inset 0 -80px 60px -30px rgba(0,0,0,0.8), 0 8px 25px rgba(0,0,0,0.3);
}

.co-echo-session-host-avatar {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.8);
    transition: box-shadow 0.3s ease;
    box-shadow: 0 0 0 0 rgba(0, 209, 255, 0.7);
    animation: pulse-glow 2s infinite ease-in-out;
}

@keyframes pulse-glow {
    0% {
        box-shadow: 0 0 0 0 rgba(0, 209, 255, 0.5);
    }
    50% {
        box-shadow: 0 0 8px 3px rgba(0, 209, 255, 0.7);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(0, 209, 255, 0.5);
    }
}

@-webkit-keyframes pulse-glow {
    0% {
        -webkit-box-shadow: 0 0 0 0 rgba(0, 209, 255, 0.5);
    }
    50% {
        -webkit-box-shadow: 0 0 8px 3px rgba(0, 209, 255, 0.7);
    }
    100% {
        -webkit-box-shadow: 0 0 0 0 rgba(0, 209, 255, 0.5);
    }
}

.co-echo-session-item:hover .co-echo-session-host-avatar {
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.7);
}

.co-echo-session-host-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.co-echo-session-info {
    z-index: 2;
}

.co-echo-session-type {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    background-color: rgba(0,0,0,0.3);
    display: inline-flex; /* Use inline-flex for alignment */
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border-radius: 5px;
    margin-bottom: 8px;
}

/* Animation for the live indicator */
.co-echo-session-type .live-indicator {
    animation: pulse-live-indicator 1.8s infinite ease-in-out;
}

@keyframes pulse-live-indicator {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.2);
        opacity: 0.7;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.co-echo-session-title {
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 8px;
    /* Clamp to 2 lines */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;  
    overflow: hidden;
}

.co-echo-session-meta {
    font-size: 0.8rem;
    opacity: 0.9;
    display: flex;
    align-items: center;
    gap: 8px;
}

.co-echo-session-host-name {
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100px;
}

.co-echo-session-participants {
    white-space: nowrap;
}

/* --- NEW: Share Button and Tooltip Styles --- */

/* General styles for share buttons in both story and space modals */
.co-echo-story-share-btn,
.co-echo-space-share-btn {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
    position: relative; /* Needed for tooltip positioning */
}

.co-echo-story-share-btn:hover,
.co-echo-space-share-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Specific container for space modal header actions */
.co-echo-space-header-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Tooltip for "Copied!" message */
.co-echo-copy-tooltip {
    position: absolute;
    bottom: 100%; /* Position above the button */
    left: 50%;
    transform: translateX(-50%);
    margin-bottom: 5px;
    background-color: #00ba7b; /* A success green color */
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
    z-index: 100;
    opacity: 1;
    transition: opacity 0.3s ease;
}

