/* === REACTIONS STYLES === */

.reactions-bar {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 0 10px;
    border-top: 1px solid var(--border);
    margin-top: 15px;
}

.reaction-btn {
    background: rgba(249, 248, 243, 0.05);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 8px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--accent);
    font-size: 13px;
    font-weight: 600;
    will-change: transform;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.reaction-btn:hover {
    background: rgba(249, 248, 243, 0.1);
    border-color: var(--gold);
    transform: translateY(-2px);
}

.reaction-btn:active {
    transform: translateY(0);
}

.reaction-btn.animating {
    animation: reaction-pulse 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes reaction-pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.15); }
    100% { transform: scale(1); }
}

.reaction-btn svg {
    transition: all 0.3s ease;
}

.reaction-btn.active {
    background: rgba(212, 175, 55, 0.15);
    border-color: var(--gold);
    color: var(--gold);
    animation: like-burst 0.5s ease;
}

.reaction-btn.active svg {
    fill: var(--gold);
    animation: heart-beat 0.5s ease;
}

@keyframes like-burst {
    0% { transform: scale(1); }
    30% { transform: scale(1.3); }
    50% { transform: scale(0.95); }
    70% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

@keyframes heart-beat {
    0%, 100% { transform: scale(1); }
    25% { transform: scale(1.2); }
    50% { transform: scale(1); }
    75% { transform: scale(1.1); }
}

.reaction-count {
    min-width: 20px;
    text-align: center;
}

/* === COMMENTS MODAL === */
.comments-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.comments-modal {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 16px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    animation: slideUp 0.3s ease;
}

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

.comments-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.comments-header h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--gold);
    font-family: 'Playfair Display', serif;
}

.close-modal-btn {
    background: none;
    border: none;
    font-size: 32px;
    color: var(--accent);
    cursor: pointer;
    line-height: 1;
    transition: all 0.3s ease;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-modal-btn:hover {
    color: var(--gold);
    transform: rotate(90deg);
}

.comments-list {
    flex: 1;
    overflow-y: auto;
    padding: 20px 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.comments-loading,
.no-comments {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
    font-size: 14px;
}

.comment-skeleton {
    background: rgba(249, 248, 243, 0.03);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
    position: relative;
    overflow: hidden;
}

.comment-skeleton::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(249, 248, 243, 0.1),
        transparent
    );
    animation: skeleton-loading 1.5s infinite;
}

@keyframes skeleton-loading {
    0% { left: -100%; }
    100% { left: 100%; }
}

.comment-skeleton::after {
    content: '';
    display: block;
    height: 40px;
    background: rgba(249, 248, 243, 0.05);
    border-radius: 8px;
}

.comment-item {
    background: rgba(249, 248, 243, 0.03);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px;
    transition: all 0.3s ease;
}

.comment-item.optimistic {
    opacity: 0.6;
    animation: pulse 1s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 0.8; }
}

.comment-item:hover {
    background: rgba(249, 248, 243, 0.05);
    border-color: var(--gold);
}

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

.comment-author {
    font-weight: 600;
    color: var(--gold);
    font-size: 14px;
}

.comment-date {
    font-size: 11px;
    color: var(--text-muted);
    letter-spacing: 0.5px;
}

.comment-text {
    color: var(--accent);
    font-size: 14px;
    line-height: 1.6;
    word-wrap: break-word;
}

/* === NEW COMMENT INPUT - CHAT STYLE === */
.comment-input-container {
    padding: 16px 20px;
    border-top: 1px solid var(--border);
    background: rgba(249, 248, 243, 0.02);
    backdrop-filter: blur(20px);
    border-radius: 0 0 16px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.comment-textarea {
    flex: 1;
    background: rgba(249, 248, 243, 0.08);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 13px 20px;
    color: var(--accent);
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    line-height: 1.5;
    resize: none;
    outline: none;
    transition: all 0.3s ease;
    min-height: 48px;
    height: 48px;
    max-height: 120px;
    overflow-y: auto;
}

.comment-textarea:focus {
    background: rgba(249, 248, 243, 0.12);
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.15);
}

.comment-textarea::placeholder {
    color: var(--text-muted);
    opacity: 0.6;
}

.comment-send-btn {
    width: 48px;
    height: 48px;
    min-width: 48px;
    min-height: 48px;
    border-radius: 50%;
    background: var(--gold);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.comment-send-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.4);
}

.comment-send-btn:active {
    transform: scale(0.95);
}

.comment-send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: scale(1);
}

.comment-send-btn svg {
    stroke: var(--bg);
    width: 22px;
    height: 22px;
    transition: transform 0.3s ease;
}

.comment-send-btn:hover svg {
    transform: translateX(2px);
}

.comment-send-btn.loading {
    opacity: 0.5;
    cursor: wait;
    pointer-events: none;
}

.comment-send-btn.loading svg {
    animation: spin 1s linear infinite;
}

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

/* === SHARE MENU === */
.share-menu-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    z-index: 10000;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.share-menu {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 16px 16px 0 0;
    width: 100%;
    max-width: 600px;
    padding: 24px;
    animation: slideUpMenu 0.3s ease;
}

@keyframes slideUpMenu {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

.share-menu h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--gold);
    font-family: 'Playfair Display', serif;
    margin-bottom: 20px;
    text-align: center;
}

.share-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.share-option {
    background: rgba(249, 248, 243, 0.05);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--accent);
}

.share-option:hover {
    background: rgba(249, 248, 243, 0.1);
    border-color: var(--gold);
    transform: translateX(5px);
}

.share-option:active {
    transform: translateX(0);
}

.share-option svg {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.share-option span {
    font-size: 16px;
    font-weight: 600;
}

.close-share-btn {
    width: 100%;
    background: rgba(249, 248, 243, 0.05);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px;
    color: var(--accent);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.close-share-btn:hover {
    background: rgba(249, 248, 243, 0.1);
    border-color: var(--gold);
}

/* === MOBILE RESPONSIVE === */
@media (max-width: 768px) {
    .reactions-bar {
        gap: 10px;
        padding: 12px 0 8px;
    }

    .reaction-btn {
        padding: 6px 12px;
        font-size: 12px;
        gap: 6px;
    }

    .reaction-btn svg {
        width: 18px;
        height: 18px;
    }

    .comments-modal {
        width: 95%;
        max-height: 85vh;
    }

    .comments-header,
    .comments-list,
    .comment-input-container {
        padding: 16px 20px;
    }

    .comment-textarea {
        font-size: 13px;
        padding: 10px 16px;
    }

    .comment-send-btn {
        width: 40px;
        height: 40px;
        min-width: 40px;
        min-height: 40px;
    }

    .comment-send-btn svg {
        width: 18px;
        height: 18px;
    }

    .share-menu {
        max-width: 100%;
    }
}

/* === TOAST NOTIFICATIONS === */
.custom-toast {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px 24px;
    z-index: 10001;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    max-width: 90%;
}

.custom-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.toast-content {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--accent);
    font-size: 14px;
    font-weight: 500;
}

.toast-error .toast-content svg {
    stroke: #ff4444;
    flex-shrink: 0;
}

.toast-success .toast-content svg {
    stroke: #50fa7b;
    flex-shrink: 0;
}

.custom-toast.toast-error {
    border-color: rgba(255, 68, 68, 0.3);
    background: rgba(255, 68, 68, 0.1);
}

.custom-toast.toast-success {
    border-color: rgba(80, 250, 123, 0.3);
    background: rgba(80, 250, 123, 0.1);
}

/* Light Theme Support */
body.light-theme .reactions-bar,
html.light-theme .reactions-bar {
    border-top-color: var(--border);
}

body.light-theme .reaction-btn,
html.light-theme .reaction-btn {
    background: rgba(26, 26, 26, 0.03);
    border-color: var(--border);
    color: var(--accent);
}

body.light-theme .reaction-btn:hover,
html.light-theme .reaction-btn:hover {
    background: rgba(26, 26, 26, 0.05);
}

body.light-theme .comment-item,
html.light-theme .comment-item {
    background: rgba(26, 26, 26, 0.02);
}

body.light-theme .comment-textarea,
html.light-theme .comment-textarea {
    background: rgba(26, 26, 26, 0.05);
    color: var(--accent);
}

body.light-theme .comment-textarea:focus,
html.light-theme .comment-textarea:focus {
    background: rgba(26, 26, 26, 0.08);
}