/* ==========================================================================
   "UC" (YOUR CHOICE) 24-HOUR STATUS & STORIES CSS
   WhatsApp-Inspired Ephemeral Stories, Audio Notes & Auto-Player
   ========================================================================== */

/* Subbar UC Button */
.btn-uc-tab {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(6, 95, 70, 0.3)) !important;
    border: 1px solid rgba(16, 185, 129, 0.4) !important;
    color: #34d399 !important;
    font-weight: 700 !important;
    letter-spacing: 0.3px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-uc-tab:hover,
.btn-uc-tab:focus-visible {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.35), rgba(6, 95, 70, 0.5)) !important;
    border-color: #10b981 !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.25);
}

.btn-uc-tab.active {
    background: linear-gradient(135deg, #10b981, #059669) !important;
    border-color: #34d399 !important;
    color: #ffffff !important;
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.4);
}

/* UC Section Full Screen Container */
.uc-section {
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
    background: var(--bg-surface, #0f172a);
    color: var(--text-main, #f8fafc);
    overflow: hidden;
}

.uc-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 18px;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    position: sticky;
    top: 0;
    z-index: 10;
}

.uc-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-uc-back {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #f8fafc;
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-uc-back:hover {
    background: rgba(255, 255, 255, 0.16);
}

.uc-title-group {
    display: flex;
    flex-direction: column;
}

.uc-header-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #f8fafc;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.uc-header-sub {
    font-size: 0.75rem;
    color: #94a3b8;
    margin-top: 2px;
}

.btn-create-status-action {
    background: linear-gradient(135deg, #10b981, #059669);
    color: #ffffff;
    border: none;
    border-radius: 20px;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
    transition: all 0.2s;
}

.btn-create-status-action:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.45);
}

/* UC Feed Content Scroll */
.uc-feed-scroll {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* My Status Card */
.uc-my-status-card {
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    transition: all 0.2s ease;
}

.uc-my-status-card:hover {
    background: rgba(30, 41, 59, 0.9);
    border-color: rgba(16, 185, 129, 0.3);
}

.uc-user-info-wrap {
    display: flex;
    align-items: center;
    gap: 14px;
    flex: 1;
}

/* Circular ring indicator around avatar */
.uc-avatar-ring {
    position: relative;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2px;
    background: #475569;
}

.uc-avatar-ring.has-status {
    background: linear-gradient(135deg, #10b981, #06b6d4, #8b5cf6);
    animation: ringGlow 3s ease infinite alternate;
}

@keyframes ringGlow {
    0% { filter: drop-shadow(0 0 2px rgba(16, 185, 129, 0.5)); }
    100% { filter: drop-shadow(0 0 6px rgba(6, 182, 212, 0.8)); }
}

.uc-avatar-inner {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: #1e293b;
    border: 2px solid #0f172a;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: 700;
    color: #f8fafc;
    overflow: hidden;
}

.uc-avatar-inner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.uc-badge-plus {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 20px;
    height: 20px;
    background: #10b981;
    color: #ffffff;
    border: 2px solid #0f172a;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 900;
}

.uc-status-meta {
    display: flex;
    flex-direction: column;
}

.uc-status-name {
    font-size: 0.95rem;
    font-weight: 700;
    color: #f8fafc;
}

.uc-status-time {
    font-size: 0.8rem;
    color: #94a3b8;
    margin-top: 3px;
}

.uc-my-status-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-icon-uc {
    background: rgba(255, 255, 255, 0.08);
    border: none;
    color: #94a3b8;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-icon-uc:hover {
    background: rgba(239, 68, 68, 0.2);
    color: #fca5a5;
}

/* Feed Section Title */
.uc-section-label {
    font-size: 0.8rem;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 8px;
}

.uc-feed-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.uc-contact-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
    cursor: pointer;
    transition: all 0.2s ease;
}

.uc-contact-item:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.1);
    transform: translateX(2px);
}

.uc-empty-feed {
    text-align: center;
    padding: 40px 20px;
    color: #94a3b8;
    font-size: 0.9rem;
    background: rgba(30, 41, 59, 0.3);
    border: 1px dashed rgba(255, 255, 255, 0.1);
    border-radius: 14px;
}

/* ==========================================================================
   MODAL: CREATE STATUS (✍️ Text / 📷 Photo / 🎙️ Voice)
   ========================================================================== */
.modal-uc-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.modal-uc-card {
    background: #1e293b;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
    overflow: hidden;
}

.modal-uc-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.modal-uc-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #f8fafc;
    margin: 0;
}

.btn-modal-close {
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 1.3rem;
    cursor: pointer;
    line-height: 1;
}

/* Segmented Tabs: Text, Photo, Voice */
.uc-segmented-tabs {
    display: flex;
    background: rgba(15, 23, 42, 0.6);
    padding: 4px;
    margin: 14px 20px 0 20px;
    border-radius: 12px;
    gap: 4px;
}

.uc-seg-tab {
    flex: 1;
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 8px 10px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.uc-seg-tab.active {
    background: #334155;
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.modal-uc-body {
    padding: 16px 20px;
    overflow-y: auto;
    flex: 1;
}

/* Text Status Preview Canvas */
.uc-text-preview-box {
    width: 100%;
    height: 180px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    color: #ffffff;
    text-align: center;
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.4;
    word-break: break-word;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.2);
    margin-bottom: 12px;
}

.uc-text-input {
    width: 100%;
    height: 80px;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    padding: 10px 12px;
    color: #ffffff;
    font-size: 0.95rem;
    resize: none;
    outline: none;
}

.uc-text-input:focus {
    border-color: #10b981;
}

/* Color Palette Selector */
.uc-palette-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    overflow-x: auto;
    padding-bottom: 4px;
}

.uc-color-swatch {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid transparent;
    transition: transform 0.2s;
    flex-shrink: 0;
}

.uc-color-swatch:hover,
.uc-color-swatch.active {
    transform: scale(1.15);
    border-color: #ffffff;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.4);
}

/* Photo Tab */
.uc-photo-dropzone {
    border: 2px dashed rgba(255, 255, 255, 0.2);
    border-radius: 14px;
    padding: 24px;
    text-align: center;
    cursor: pointer;
    background: rgba(15, 23, 42, 0.4);
    transition: all 0.2s;
}

.uc-photo-dropzone:hover {
    border-color: #10b981;
    background: rgba(16, 185, 129, 0.05);
}

.uc-photo-preview {
    max-width: 100%;
    max-height: 220px;
    border-radius: 12px;
    object-fit: contain;
    margin-top: 10px;
}

/* Voice Tab */
.uc-voice-recorder-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px 10px;
    gap: 16px;
}

.btn-uc-record {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #ffffff;
    border: none;
    font-size: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(239, 68, 68, 0.4);
    transition: all 0.2s;
}

.btn-uc-record.recording {
    animation: recordPulse 1.2s infinite;
    background: #b91c1c;
}

@keyframes recordPulse {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
    70% { transform: scale(1.08); box-shadow: 0 0 0 14px rgba(239, 68, 68, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

.uc-record-timer {
    font-size: 1.2rem;
    font-weight: 700;
    font-family: monospace;
    color: #f8fafc;
}

/* Modal Footer */
.modal-uc-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    padding: 14px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.btn-uc-cancel {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #94a3b8;
    border-radius: 10px;
    padding: 8px 16px;
    font-weight: 600;
    cursor: pointer;
}

.btn-uc-submit {
    background: linear-gradient(135deg, #10b981, #059669);
    border: none;
    color: #ffffff;
    border-radius: 10px;
    padding: 8px 20px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

/* ==========================================================================
   FULLSCREEN STORY PLAYER (WhatsApp / Instagram Style Auto-Loop)
   ========================================================================== */
.modal-story-overlay {
    position: fixed;
    inset: 0;
    z-index: 999999;
    background: #000000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.story-player-card {
    position: relative;
    width: 100%;
    height: 100%;
    max-width: 480px;
    background: #000000;
    display: flex;
    flex-direction: column;
    user-select: none;
    overflow: hidden;
}

/* Progress Bars at top */
.story-progress-container {
    position: absolute;
    top: 12px;
    left: 12px;
    right: 12px;
    display: flex;
    gap: 5px;
    z-index: 50;
}

.story-progress-bar {
    flex: 1;
    height: 3px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
    overflow: hidden;
}

.story-progress-fill {
    width: 0%;
    height: 100%;
    background: #ffffff;
    transition: width 0.05s linear;
}

.story-progress-bar.completed .story-progress-fill {
    width: 100%;
}

/* Story Header */
.story-header {
    position: absolute;
    top: 24px;
    left: 14px;
    right: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 50;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.6) 0%, rgba(0, 0, 0, 0) 100%);
    padding-bottom: 20px;
}

.story-user-badge {
    display: flex;
    align-items: center;
    gap: 10px;
}

.story-user-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 2px solid #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    background: #334155;
    color: #ffffff;
    overflow: hidden;
}

.story-user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.story-meta-names {
    display: flex;
    flex-direction: column;
}

.story-meta-name {
    font-size: 0.95rem;
    font-weight: 700;
    color: #ffffff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

.story-meta-time {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.8);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

.story-actions-top {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-story-action {
    background: rgba(0, 0, 0, 0.4);
    border: none;
    color: #ffffff;
    border-radius: 50%;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    cursor: pointer;
    backdrop-filter: blur(4px);
}

/* Center Content */
.story-content-stage {
    flex: 1;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.story-text-view {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px;
    text-align: center;
    font-size: 1.6rem;
    font-weight: 700;
    line-height: 1.45;
    color: #ffffff;
    word-break: break-word;
}

.story-image-view {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
}

.story-image-view img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.story-caption-bar {
    position: absolute;
    bottom: 24px;
    left: 16px;
    right: 16px;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(8px);
    border-radius: 12px;
    padding: 10px 14px;
    color: #ffffff;
    font-size: 0.95rem;
    text-align: center;
    line-height: 1.4;
    z-index: 40;
}

/* Voice Story View */
.story-voice-view {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1e1b4b, #312e81, #0f172a);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: 30px;
}

.story-waveform-icon {
    font-size: 4rem;
    animation: waveBounce 1s infinite alternate;
}

@keyframes waveBounce {
    0% { transform: scale(0.9); opacity: 0.7; }
    100% { transform: scale(1.1); opacity: 1; filter: drop-shadow(0 0 16px #38bdf8); }
}

.story-voice-caption {
    font-size: 1.15rem;
    font-weight: 600;
    color: #e2e8f0;
    text-align: center;
}

/* Left & Right Tap Zones */
.story-tap-zone-left,
.story-tap-zone-right {
    position: absolute;
    top: 60px;
    bottom: 0;
    z-index: 30;
    cursor: pointer;
}

.story-tap-zone-left {
    left: 0;
    width: 35%;
}

.story-tap-zone-right {
    right: 0;
    width: 65%;
}
