:root {
    --primary: #ff6900;
    --primary-dark: #e55e00;
    --primary-light: #ff8533;
    --accent: #0693e3;
    --bg-dark: #0a0a0f;
    --bg-card: #14141f;
    --bg-elevated: #1a1a2e;
    --border: rgba(255,255,255,0.1);
    --text: #ffffff;
    --text-muted: #8a8a9e;
    --danger: #ff3b3b;
    --success: #00d084;
    --warning: #fbbf24;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-dark);
    color: var(--text);
    line-height: 1.5;
    overflow-x: hidden;
}

.app { min-height: 100vh; display: flex; flex-direction: column; }

.header {
    position: sticky; top: 0; z-index: 100;
    background: rgba(10,10,15,0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    padding: 12px 24px;
    display: flex; justify-content: space-between; align-items: center;
}

.logo { height: 40px; object-fit: contain; }

.header-right { display: flex; align-items: center; gap: 16px; }

.clock {
    display: flex; align-items: center; gap: 8px;
    padding: 6px 12px; background: var(--bg-card);
    border-radius: 30px; font-size: 13px; font-weight: 500; color: var(--text-muted);
}

.live-status {
    display: flex; align-items: center; gap: 8px;
    padding: 6px 14px; border-radius: 30px;
    font-weight: 600; font-size: 13px;
    transition: all 0.3s ease; white-space: nowrap;
}

.live-status.live { background: rgba(255,59,59,0.15); border: 1px solid rgba(255,59,59,0.4); color: var(--danger); }
.live-status.waiting { background: rgba(6,147,227,0.15); border: 1px solid rgba(6,147,227,0.4); color: var(--accent); }
.live-status.ended { background: rgba(255,255,255,0.05); border: 1px solid var(--border); color: var(--text-muted); }

.pulse-dot {
    width: 8px; height: 8px; background: currentColor;
    border-radius: 50%; animation: pulse 1.5s ease-in-out infinite; flex-shrink: 0;
}

@keyframes pulse { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:0.5;transform:scale(0.8)} }

.main { flex: 1; max-width: 1200px; margin: 0 auto; padding: 24px; width: 100%; }

.player-section {
    position: relative; background: #000;
    border-radius: 16px; overflow: hidden;
    box-shadow: 0 20px 40px rgba(0,0,0,0.4); margin-bottom: 24px;
}

.player-container {
    position: relative; background: #000;
    aspect-ratio: 16/9; cursor: pointer; overflow: hidden;
}

.video-element {
    position: absolute; top: 0; left: 0;
    width: 100%; height: 100%; object-fit: contain; background: #000;
}

/* Hide native controls - all browsers */
.video-element::-webkit-media-controls { display: none !important; }
.video-element::-webkit-media-controls-enclosure { display: none !important; }
.video-element::-webkit-media-controls-panel { display: none !important; }
.video-element::-webkit-media-controls-play-button { display: none !important; }
.video-element::-webkit-media-controls-timeline { display: none !important; }
.video-element::-webkit-media-controls-current-time-display { display: none !important; }
.video-element::-webkit-media-controls-time-remaining-display { display: none !important; }
.video-element::-webkit-media-controls-mute-button { display: none !important; }
.video-element::-webkit-media-controls-volume-slider { display: none !important; }
.video-element::-webkit-media-controls-fullscreen-button { display: none !important; }
.video-element::-webkit-media-controls-rewind-button { display: none !important; }
.video-element::-webkit-media-controls-seek-back-button { display: none !important; }
.video-element::-webkit-media-controls-seek-forward-button { display: none !important; }
.video-element::-webkit-media-controls-toggle-closed-captions-button { display: none !important; }
.video-element::-webkit-media-controls-overlay-enclosure { display: none !important; }
.video-element::--webkit-media-controls-overlay { display: none !important; }

/* iOS specific */
@supports (-webkit-touch-callout: none) {
    .video-element {
        -webkit-appearance: none;
        appearance: none;
    }
    .video-element::-webkit-media-controls {
        display: none !important;
        opacity: 0 !important;
        pointer-events: none !important;
    }
}

.overlay-gif { width: 80px; height: 80px; object-fit: contain; border-radius: -20px; margin-bottom: 8px; }

/* BOTÓN DE SONIDO EN CONTROLES */
#btnSound { font-size: 16px; }

/* CUSTOM VIDEO CONTROLS */
.custom-controls {
    position: absolute; bottom: 0; left: 0; right: 0; z-index: 50;
    background: linear-gradient(transparent, rgba(0,0,0,0.85));
    padding: 40px 16px 12px;
    display: flex; align-items: center; justify-content: flex-end; gap: 10px;
    opacity: 0; transform: translateY(4px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
}

.custom-controls.visible { opacity: 1; transform: translateY(0); pointer-events: auto; }

.ctrl-btn {
    background: rgba(255,255,255,0.15); border: none; color: #fff;
    cursor: pointer; padding: 10px; border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    transition: background 0.2s, transform 0.15s;
    flex-shrink: 0; font-size: 18px; min-width: 40px; min-height: 40px;
}

.ctrl-btn:hover { background: rgba(255,255,255,0.25); transform: scale(1.1); }

/* FULLSCREEN */
.player-container:fullscreen, .player-container:-webkit-full-screen {
    aspect-ratio: auto; width: 100vw; height: 100vh;
}
.player-container:fullscreen .video-element, .player-container:-webkit-full-screen .video-element { object-fit: contain; }
.player-container:fullscreen .custom-controls, .player-container:-webkit-full-screen .custom-controls { padding: 60px 24px 16px; }

/* iOS Custom Fullscreen (sin controles nativos) */
.player-container.custom-fullscreen {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 9999 !important;
    border-radius: 0 !important;
    aspect-ratio: auto !important;
    background: #000 !important;
}

.player-container.custom-fullscreen .video-element {
    object-fit: contain !important;
}

.player-container.custom-fullscreen .custom-controls {
    padding: 60px 24px 16px !important;
}

/* OVERLAYS */
.overlay {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(135deg, var(--bg-dark) 0%, var(--bg-elevated) 100%);
    display: flex; align-items: center; justify-content: center;
    z-index: 20; overflow: hidden;
}
.overlay.hidden { display: none; }

.overlay-content {
    text-align: center; padding: 32px 24px;
    animation: fadeInUp 0.5s ease; max-width: 100%; overflow: hidden;
}

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

.animation-icon {
    font-size: 56px; margin-bottom: 12px; margin-top: 4px;
    animation: float 3s ease-in-out infinite;
}

.overlay-gif {
    width: 70px;
    height: 70px;
    object-fit: contain;
    border-radius: 12px;
    margin-bottom: -20px;
}

@keyframes float { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-10px)} }

.overlay-content h2 {
    font-size: 26px; margin-bottom: 10px;
    background: linear-gradient(135deg, var(--text), var(--primary-light));
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}

.overlay-content p { color: var(--text-muted); margin-bottom: 20px; }

.spinner {
    width: 48px; height: 48px; border: 3px solid var(--border);
    border-top-color: var(--primary); border-radius: 50%;
    animation: spin 1s linear infinite; margin-bottom: 16px;
}
@keyframes spin { to{transform:rotate(360deg)} }

.countdown-timer { 
    display: flex; 
    justify-content: center; 
    gap: 12px; 
    margin-top: 20px; 
    margin-bottom: 20px; 
}

.time-card {
    background: rgba(255,255,255,0.05); backdrop-filter: blur(10px);
    padding: 14px 18px; border-radius: 12px; min-width: 70px;
    border: 1px solid var(--border);
}
.time-value { display: block; font-size: 32px; font-weight: 800; font-family: monospace; color: var(--primary); line-height: 1; }
.time-label { font-size: 11px; text-transform: uppercase; color: var(--text-muted); margin-top: 6px; display: block; }

/* INFO BAR */
.info-bar {
    padding: 16px 20px;
    background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-elevated) 100%);
    border-top: 1px solid var(--border);
    display: flex; justify-content: space-between; align-items: center;
    flex-wrap: wrap; gap: 12px;
}
.info-left { display: flex; align-items: center; gap: 12px; min-width: 0; flex: 1; }
.live-indicator { width: 10px; height: 10px; background: var(--danger); border-radius: 50%; animation: pulse 1.5s ease-in-out infinite; flex-shrink: 0; }
.info-left h3 { font-size: 16px; font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.info-left p { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.info-right {
    display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-muted);
    background: rgba(255,255,255,0.05); padding: 6px 12px; border-radius: 30px;
    flex-shrink: 0; white-space: nowrap;
}

.sound-hint { display: none !important; }

/* SCHEDULE */
.schedule { margin-top: 24px; display: none; /* Oculto temporalmente */ }
button.schedule-toggle { display: none !important; }
.schedule-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; max-width: 400px; margin: 0 auto; }
.schedule-card {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: 12px; padding: 12px; text-align: center; transition: all 0.3s ease;
}
.schedule-card:hover { border-color: var(--primary); transform: translateY(-2px); }
.schedule-card.live { border-color: var(--danger); background: rgba(255,59,59,0.05); }
.schedule-card .time { font-size: 20px; font-weight: 700; color: var(--primary); }
.schedule-card .status { font-size: 10px; font-weight: 600; display: inline-block; margin-top: 6px; padding: 3px 8px; border-radius: 20px; }
.schedule-card .status.live { background: rgba(255,59,59,0.2); color: var(--danger); }
.schedule-card .status.upcoming { background: rgba(6,147,227,0.15); color: var(--accent); }
.schedule-card .status.ended { background: rgba(255,255,255,0.05); color: var(--text-muted); }

/* Badge EN VIVO en tarjeta de horario */
.live-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 6px;
    padding: 4px 12px;
    background: rgba(255, 59, 59, 0.2);
    color: var(--danger);
    border-radius: 20px;
    font-size: 10px;
    font-weight: 600;
}

.live-badge .pulse-dot {
    width: 8px;
    height: 8px;
    background: var(--danger);
    border-radius: 50%;
    animation: pulse 1.5s ease-in-out infinite;
}

/* FOOTER */
.footer { text-align: center; padding: 20px; border-top: 1px solid var(--border); color: var(--text-muted); font-size: 12px; }
.footer a { color: var(--primary); text-decoration: none; }

/* CHAT SECTION */
.chat-section {
    margin-top: 24px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
}

.chat-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 20px;
    background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-elevated) 100%);
    border-bottom: 1px solid var(--border);
}

.chat-header span {
    font-size: 20px;
}

.chat-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
}

.chat-container {
    padding: 0;
    background: #000;
    min-height: 450px;
}

.chat-container iframe {
    display: block;
    width: 100%;
    height: 450px;
    border: none;
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .main { padding: 16px; }
    .header { padding: 16px 18px; flex-direction: column; gap: 14px; align-items: stretch; }
    .header-left { display: flex; justify-content: center; }
    .logo { height: 44px; }
    .header-right { display: flex; justify-content: center; align-items: center; gap: 14px; flex-wrap: wrap; }
    .clock { padding: 8px 16px; font-size: 15px; border-radius: 24px; }
    .live-status { padding: 8px 18px; font-size: 14px; }
    .pulse-dot { width: 10px; height: 10px; }
    button.schedule-toggle {
        display: flex !important; align-items: center; gap: 14px; width: 100%;
        padding: 18px 20px; background: var(--bg-card); border: 1px solid var(--border);
        border-radius: 14px; color: var(--text); cursor: pointer; font-family: inherit; transition: all 0.3s ease;
    }
    .schedule-toggle:hover, .schedule-toggle.active { border-color: var(--primary); background: rgba(255,105,0,0.05); }
    .schedule-toggle h3 { font-size: 18px; font-weight: 600; flex: 1; text-align: left; }
    .toggle-arrow { font-size: 16px; color: var(--text-muted); transition: transform 0.3s ease; }
    .toggle-arrow.open { transform: rotate(180deg); }
    .schedule-grid {
        display: grid; overflow: hidden;
        transition: max-height 0.4s ease, opacity 0.3s ease, margin-top 0.3s ease;
        max-height: 2000px; opacity: 1; margin-top: 14px;
        grid-template-columns: repeat(2, 1fr); gap: 10px; max-width: 400px;
    }
    .schedule-grid.collapsed { max-height: 0; opacity: 0; margin-top: 0; }
    .overlay-content { padding: 28px 20px; }
    .overlay-content h2 { font-size: 24px; margin-bottom: 10px; }
    .overlay-content p { font-size: 15px; margin-bottom: 14px; }
    .overlay-gif { width: 60px; height: 60px; margin-bottom: 10px; }
    .animation-icon { font-size: 44px; margin-bottom: 10px; margin-top: 6px; }
    .countdown-timer { gap: 10px; margin-top: 20px; margin-bottom: 20px; }
    .time-card { padding: 12px 14px; min-width: 70px; border-radius: 10px; }
    .time-value { font-size: 28px; }
    .time-label { font-size: 11px; margin-top: 4px; }
    .info-bar { padding: 16px 18px; flex-direction: column; align-items: flex-start; gap: 12px; }
    .info-left { gap: 12px; }
    .live-indicator { width: 14px; height: 14px; }
    .info-left h3 { font-size: 17px; }
    .info-left p { font-size: 13px; }
    .info-right { font-size: 14px; padding: 8px 16px; }
    .schedule-card { padding: 14px 12px; border-radius: 12px; }
    .schedule-card .time { font-size: 20px; }
    .schedule-card .status { font-size: 11px; padding: 4px 10px; }
    .player-section { border-radius: 14px; margin-bottom: 16px; }
    .custom-controls { padding: 32px 12px 12px; }
    .ctrl-btn { padding: 12px; min-width: 48px; min-height: 48px; font-size: 22px; }
    .chat-section { margin-top: 16px; border-radius: 14px; }
    .chat-container { min-height: 350px; }
    .chat-container iframe { height: 350px; }
}

@media (max-width: 480px) {
    .main { padding: 12px; }
    .header { padding: 14px 12px; gap: 12px; }
    .logo { height: 40px; }
    .header-right { gap: 12px; }
    .clock { padding: 7px 14px; font-size: 14px; }
    .live-status { padding: 7px 16px; font-size: 13px; }
    .live-status .pulse-dot { width: 9px; height: 9px; }
    .schedule-toggle { padding: 16px 18px; }
    .schedule-toggle h3 { font-size: 17px; }
    .toggle-arrow { font-size: 15px; }
    .schedule-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; max-width: 400px; }
    .schedule-card { padding: 12px 10px; }
    .schedule-card .time { font-size: 19px; }
    .schedule-card .status { font-size: 11px; padding: 4px 9px; }
    .overlay-content { padding: 20px 16px; }
    .overlay-content h2 { font-size: 20px; margin-bottom: 8px; }
    .overlay-content p { font-size: 14px; margin-bottom: 12px; }
    .overlay-gif { width: 50px; height: 50px; margin-bottom: 8px; }
    .animation-icon { font-size: 36px; margin-bottom: 8px; margin-top: 4px; }
    .countdown-timer { gap: 8px; margin-top: 16px; margin-bottom: 16px; }
    .time-card { padding: 10px 12px; min-width: 60px; border-radius: 8px; }
    .time-value { font-size: 24px; }
    .time-label { font-size: 10px; margin-top: 3px; }
    .info-bar { padding: 14px 16px; gap: 10px; }
    .info-left h3 { font-size: 16px; }
    .info-left p { font-size: 13px; }
    .info-right { font-size: 13px; padding: 6px 14px; }
    .player-section { border-radius: 12px; margin-bottom: 12px; }
    .custom-controls { padding: 24px 10px 10px; }
    .ctrl-btn { padding: 12px; min-width: 46px; min-height: 46px; font-size: 20px; }
    .footer { padding: 16px; font-size: 12px; }
    .chat-section { margin-top: 12px; border-radius: 12px; }
    .chat-container { min-height: 300px; }
    .chat-container iframe { height: 300px; }
}

@media (min-width: 1200px) { .main { max-width: 1400px; } }

/* =========================
   COMMENTS SYSTEM
========================= */

.comments-box{
    width:100%;
    max-width:700px;
    margin:auto;
    background:#111;
    border-radius:24px;
    padding:20px;
    color:white;
    box-sizing:border-box;
    position:relative;
}

/* COMMENTS HEADER */

.comments-header{
    display:flex;
    justify-content:space-between;
    align-items:center;
    margin-bottom:20px;
    flex-wrap:wrap;
    gap:10px;
}

.comments-header-actions{
    display:flex;
    align-items:center;
    gap:10px;
}

.comments-box h2{
    font-size:16px;
    font-weight:700;
    margin:0;
}

/* ADMIN LOGIN BUTTON */

.admin-login-btn{
    background:#1c1c1c;
    color:#8a8a9e;
    border:1px solid rgba(255,255,255,0.1);
    padding:6px 12px;
    border-radius:12px;
    cursor:pointer;
    font-size:12px;
    font-weight:600;
    transition:all 0.3s ease;
}

.admin-login-btn:hover{
    background:#252525;
    color:white;
}

.admin-login-btn.admin-active{
    background:rgba(255,105,0,0.2);
    color:#ff6900;
    border-color:#ff6900;
}

/* CONNECTION STATUS */

.connection-status{
    display:flex;
    align-items:center;
    gap:6px;
    font-size:12px;
    padding:4px 10px;
    border-radius:12px;
    background:#1c1c1c;
    transition:all 0.3s ease;
}

.connection-status.connected{
    color:#00d084;
}

.connection-status.disconnected{
    color:#ff3b3b;
}

.connection-status .status-dot{
    width:8px;
    height:8px;
    border-radius:50%;
    background:currentColor;
    animation:pulse 1.5s ease-in-out infinite;
}

/* FORM */

.comment-form{
    margin-bottom:25px;
}

.comments-box input,
.comments-box textarea{
    width:100%;
    box-sizing:border-box;
    border:none;
    outline:none;
    background:#1c1c1c;
    color:white;
    padding:14px;
    border-radius:16px;
    margin-bottom:12px;
    font-size:15px;
    transition:0.3s;
}

.comments-box input:focus,
.comments-box textarea:focus{
    background:#252525;
}

.comments-box input::placeholder,
.comments-box textarea::placeholder{
    color:#666;
}

.textarea-wrapper{
    position:relative;
}

.comments-box textarea{
    resize:none;
    min-height:100px;
    padding-bottom:30px;
}

/* FORM ACTIONS */

.form-actions{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
}

/* REPLY INDICATOR */

.reply-indicator{
    background:#1c1c1c;
    padding:10px 14px;
    border-radius:12px;
    margin-bottom:12px;
    font-size:13px;
    display:none;
    align-items:center;
    justify-content:space-between;
    color:#8a8a9e;
}

.reply-indicator.visible{
    display:flex;
}

.reply-indicator strong{
    color:#ff6900;
}

.cancel-reply{
    background:none;
    border:none;
    color:#8a8a9e;
    cursor:pointer;
    font-size:16px;
    padding:4px;
}

.cancel-reply:hover{
    color:white;
}

/* EMOJI PICKER */

.emoji-picker{
    position:relative;
}

.emoji-btn{
    background:#1c1c1c;
    border:none;
    padding:10px 14px;
    border-radius:12px;
    cursor:pointer;
    font-size:20px;
    transition:all 0.2s ease;
}

.emoji-btn:hover{
    background:#252525;
    transform:scale(1.1);
}

.emoji-panel{
    position:absolute;
    bottom:calc(100% + 8px);
    left:0;
    background:#1c1c1c;
    border:1px solid rgba(255,255,255,0.1);
    border-radius:16px;
    padding:12px;
    display:none;
    z-index:200;
    box-shadow:0 10px 30px rgba(0,0,0,0.5);
    width: 100%;
    min-width: fit-content;
}

.emoji-panel.visible{
    display:block;
}

.emoji-grid{
    display:grid;
    grid-template-columns:repeat(6,1fr);
    gap:2px;
}

.emoji{
    font-size:24px;
    padding:8px;
    cursor:pointer;
    border-radius:8px;
    transition:all 0.2s ease;
    text-align:center;
    line-height:1;
    user-select:none;
}

.emoji:hover{
    background:#252525;
    transform:scale(1.2);
}

/* CHARACTER COUNTER */

.char-counter{
    position:absolute;
    bottom:22px;
    right:14px;
    font-size:11px;
    color:#666;
    pointer-events:none;
}

.char-counter.warning{
    color:#ff3b3b;
}

/* BUTTON */

.comments-box button#sendComment{
    border:none;
    outline:none;
    background:#ff6900;
    color:white;
    padding:12px 20px;
    border-radius:14px;
    cursor:pointer;
    font-weight:600;
    transition:all 0.3s ease;
    display:flex;
    align-items:center;
    gap:8px;
    font-size:15px;
}

.comments-box button#sendComment:hover{
    transform:scale(1.03);
    opacity:0.9;
}

.comments-box button#sendComment:disabled{
    opacity:0.6;
    cursor:not-allowed;
    transform:none;
}

.comments-box button#sendComment.success{
    background:#00d084;
}

.comments-box button#sendComment.error{
    background:#ff3b3b;
}

.comments-box button#sendComment.cooldown{
    background:#666;
}

.btn-icon{
    font-size:16px;
}

/* NEW COMMENTS BADGE */

.new-comments-badge{
    position:sticky;
    top:0;
    z-index:10;
    background:#ff6900;
    color:white;
    text-align:center;
    padding:8px 16px;
    border-radius:12px;
    font-size:13px;
    font-weight:600;
    cursor:pointer;
    margin-bottom:10px;
    opacity:0;
    transform:translateY(-10px);
    transition:all 0.3s ease;
    pointer-events:none;
}

.new-comments-badge.visible{
    opacity:1;
    transform:translateY(0);
    pointer-events:auto;
}

/* COMMENTS CONTAINER */

.comments-container{
    display:flex;
    flex-direction:column;
    gap:15px;
    max-height:400px;
    overflow-y:auto;
    scroll-behavior:smooth;
    padding-right:5px;
}

/* SCROLL TO BOTTOM BUTTON */

.scroll-to-bottom{
    position:absolute;
    bottom:20px;
    right:20px;
    width:40px;
    height:40px;
    border-radius:50%;
    background:#ff6900;
    color:white;
    border:none;
    cursor:pointer;
    font-size:18px;
    display:flex;
    align-items:center;
    justify-content:center;
    opacity:0;
    transform:scale(0.8);
    transition:all 0.3s ease;
    pointer-events:none;
    z-index:5;
}

.scroll-to-bottom.visible{
    opacity:1;
    transform:scale(1);
    pointer-events:auto;
}

/* SINGLE COMMENT */

.comment{
    background:#1b1b1b;
    border-radius:20px;
    padding:16px;
    animation:fadeIn 0.3s ease;
    transition:background 0.2s ease;
}

.comment:hover{
    background:#222;
}

/* DELETING ANIMATION */

.comment.deleting{
    opacity:0;
    transform:translateX(-20px);
    transition:all 0.3s ease;
}

/* PINNED COMMENT */

.pinned{
    border:2px solid gold;
    background:#1a1a10;
}

/* COMMENT HEADER */

.comment-header{
    display:flex;
    align-items:center;
    gap:12px;
    margin-bottom:12px;
}

/* AVATAR */

.avatar{
    width:48px;
    height:48px;
    border-radius:50%;
    object-fit:cover;
    flex-shrink:0;
}

/* AVATAR LETTER */

.avatar-letter{
    width:48px;
    height:48px;
    border-radius:50%;
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:20px;
    font-weight:700;
    color:white;
    flex-shrink:0;
    text-transform:uppercase;
}

/* AVATAR ADMIN */

.avatar-admin{
    width:48px;
    height:48px;
    border-radius:50%;
    overflow:hidden;
    flex-shrink:0;
    border:2px solid #ff6900;
}

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

/* COMMENT REPLY TO */

.reply-to{
    font-size:12px;
    color:#8a8a9e;
    margin-bottom:8px;
    padding-left:20px;
    display:flex;
    align-items:center;
    gap:6px;
}

.reply-arrow{
    font-size:14px;
}

.reply-to strong{
    color:#ff6900;
}

.comment.is-reply{
    border-left:3px solid #ff6900;
    margin-left:20px;
}

/* USER INFO */

.comment-user-info{
    flex:1;
    min-width:0;
}

.comment-name{
    font-size:15px;
    font-weight:700;
    color:#ff6900;
    display:flex;
    align-items:center;
    gap:8px;
    flex-wrap:wrap;
}

.comment-time{
    font-size:12px;
    opacity:0.6;
    margin-top:3px;
}

/* COMMENT TEXT */

.comment-text{
    font-size:15px;
    line-height:1.6;
    margin-bottom:14px;
    word-break:break-word;
    white-space:pre-wrap;
}

/* ACTIONS */

.comment-actions{
    display:flex;
    align-items:center;
    gap:10px;
    flex-wrap:wrap;
}

/* ACTION BUTTONS */

.action-buttons{
    display:flex;
    align-items:center;
    gap:6px;
    margin-left:auto;
}

.action-btn{
    background:#252525;
    border:none;
    padding:8px 12px;
    border-radius:10px;
    cursor:pointer;
    font-size:16px;
    transition:all 0.2s ease;
    display:flex;
    align-items:center;
    justify-content:center;
}

.action-btn:hover{
    background:#333;
    transform:scale(1.1);
}

.action-btn.delete-btn:hover{
    background:rgba(255,59,59,0.3);
}

.action-btn.pin-btn:hover{
    background:rgba(251,191,36,0.3);
}

.action-btn.reply-btn:hover{
    background:rgba(6,147,227,0.3);
}

/* ALWAYS SHOW REPLY BUTTON FOR EVERYONE */
.action-btn.reply-btn{
    display:flex !important;
}

/* ADMIN BUTTONS - HIDDEN BY DEFAULT */
.action-btn.pin-btn,
.action-btn.delete-btn{
    display:none;
}

/* SHOW ADMIN BUTTONS WHEN LOGGED IN */
.is-admin .action-btn.pin-btn,
.is-admin .action-btn.delete-btn{
    display:flex !important;
}

/* LIKE BUTTON */

.like-btn{
    background:#252525 !important;
    color:white;
    border:none;
    padding:8px 14px;
    border-radius:12px;
    cursor:pointer;
    transition:all 0.3s ease;
    font-size:14px;
    display:flex;
    align-items:center;
    gap:6px;
}

.like-btn:hover{
    background:#333 !important;
    transform:scale(1.05);
}

.like-btn.liked{
    background:rgba(255,105,0,0.2) !important;
}

.like-icon{
    font-size:14px;
}

.like-count{
    font-weight:600;
}

/* ADMIN BADGE */

.admin-badge{
    background:#ff6900;
    color:white;
    font-size:11px;
    padding:4px 8px;
    border-radius:10px;
    font-weight:600;
}

/* PINNED BADGE */

.pinned-badge{
    background:gold;
    color:black;
    font-size:11px;
    padding:4px 8px;
    border-radius:10px;
    font-weight:700;
}

/* ANIMATION */

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

@keyframes shake{
    0%,100%{transform:translateX(0)}
    25%{transform:translateX(-5px)}
    75%{transform:translateX(5px)}
}

.shake{
    animation:shake 0.5s ease;
}

/* SCROLLBAR */

.comments-container::-webkit-scrollbar{
    width:6px;
}

.comments-container::-webkit-scrollbar-track{
    background:transparent;
}

.comments-container::-webkit-scrollbar-thumb{
    background:#444;
    border-radius:10px;
}

.comments-container::-webkit-scrollbar-thumb:hover{
    background:#555;
}

/* MOBILE */

@media(max-width:768px){

    .comments-box{
        padding:15px;
        border-radius:18px;
    }

    .comments-header{
        flex-direction:column;
        align-items:flex-start;
    }

    .comments-header-actions{
        width:100%;
        justify-content:space-between;
    }

    .comments-box h2{
        font-size:20px;
    }

    .comment{
        padding:14px;
    }

    .avatar,
    .avatar-letter{
        width:42px;
        height:42px;
        font-size:18px;
    }

    .comment-text{
        font-size:14px;
    }

    .comments-container{
        max-height:300px;
    }

    .admin-controls{
        margin-left:0;
        margin-top:8px;
    }

    .emoji-panel{
        position:fixed;
        bottom:0;
        left:0;
        right:0;
        width:100%;
        border-radius:16px 16px 0 0;
        padding:16px;
    }

    .emoji-grid{
        grid-template-columns:repeat(8,1fr);
    }

    .emoji{
        font-size:28px;
        padding:10px;
    }

    .form-actions{
        flex-direction:column;
        gap:10px;
    }

    .emoji-picker{
        width:100%;
    }

    .emoji-btn{
        width:100%;
        text-align:center;
    }

}