/**
 * Thread view styles - Cyberpunk Crimson
 */

/* Error notice for consecutive posts */
.error-notice {
    background: rgba(255, 68, 68, 0.1);
    border: 1px solid rgba(255, 68, 68, 0.4);
    color: #ff4444;
    padding: 12px 18px;
    margin-bottom: 20px;
    font-size: 0.9em;
    letter-spacing: 0.5px;
}

/* Neon glow keyframes */
@keyframes thread-pulse {
    0%, 100% { box-shadow: 0 0 10px rgba(255, 0, 51, 0.2); }
    50% { box-shadow: 0 0 20px rgba(255, 0, 51, 0.4); }
}

@keyframes author-glow {
    0%, 100% { text-shadow: 0 0 5px rgba(255, 102, 0, 0.5); }
    50% { text-shadow: 0 0 15px rgba(255, 102, 0, 0.8); }
}

.thread-header {
    margin-bottom: 35px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 0, 51, 0.2);
}

.breadcrumb {
    color: var(--text-muted);
    font-size: 0.85em;
    margin-bottom: 15px;
    letter-spacing: 1px;
}

.breadcrumb a {
    color: var(--accent-primary);
    text-decoration: none;
    transition: all 0.3s ease;
}

.breadcrumb a:hover {
    text-shadow: 0 0 10px rgba(255, 0, 51, 0.6);
}

.thread-header h1 {
    color: var(--text-primary);
    font-size: 1.8em;
    margin-bottom: 12px;
    text-shadow: 0 0 20px rgba(255, 0, 51, 0.3);
    letter-spacing: 2px;
}

.thread-meta {
    color: var(--text-muted);
    font-size: 0.85em;
    letter-spacing: 1px;
}

/* Mute Thread Button */
.btn-mute-thread {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-muted);
    padding: 4px 10px;
    font-size: 0.85em;
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: 0.5px;
}

.btn-mute-thread:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    background: rgba(255, 0, 51, 0.1);
}

.btn-mute-thread.muted {
    background: rgba(255, 0, 51, 0.15);
    border-color: rgba(255, 0, 51, 0.4);
    color: #ff6666;
}

.btn-mute-thread.muted:hover {
    background: rgba(0, 255, 100, 0.1);
    border-color: rgba(0, 255, 100, 0.4);
    color: #66ff88;
}

.btn-mute-thread:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.posts-container {
    margin-bottom: 35px;
}

.post {
    background: linear-gradient(180deg, #111 0%, #0a0a0a 100%);
    border: 1px solid #222;
    margin-bottom: 25px;
    display: flex;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.5);
    transition: all 0.3s ease;
    animation: thread-pulse 3s ease-in-out infinite;
}

.post:hover {
    border-color: rgba(255, 0, 51, 0.4);
    box-shadow: 0 0 25px rgba(255, 0, 51, 0.2);
}

.post-author-panel {
    width: 180px;
    background: linear-gradient(180deg, #0a0a0a 0%, #050505 100%);
    padding: 20px 15px;
    border-right: 3px solid var(--accent-primary);
    box-shadow: inset 0 0 20px rgba(255, 0, 51, 0.05);
    position: relative;
    z-index: 5;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

/* Author Avatar */
.author-avatar-link {
    display: block;
    margin-bottom: 12px;
}

.author-avatar-img {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--accent-primary);
    box-shadow: 0 0 15px rgba(255, 0, 51, 0.3);
    transition: all 0.3s ease;
}

.author-avatar-img:hover {
    border-color: var(--accent-orange);
    box-shadow: 0 0 25px rgba(255, 102, 0, 0.5);
    transform: scale(1.02);
}

.author-avatar-default {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1a1a2e 0%, #0f0f1a 100%);
    border: 3px solid var(--accent-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3.5rem;
    font-weight: bold;
    color: var(--accent-primary);
    text-shadow: 0 0 20px rgba(255, 0, 51, 0.5);
    transition: all 0.3s ease;
}

.author-avatar-default:hover {
    border-color: var(--accent-orange);
    color: var(--accent-orange);
    box-shadow: 0 0 25px rgba(255, 102, 0, 0.4);
}

/* Anonymous Avatar */
.anonymous-avatar {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0a1a0a 0%, #051505 100%);
    border: 3px dashed var(--accent-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--accent-secondary);
    margin-bottom: 12px;
    animation: ghost-pulse 3s ease-in-out infinite;
}

@keyframes ghost-pulse {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

/* Author Title/Display Name */
.author-title {
    color: var(--text-muted);
    font-size: 0.75rem;
    margin-bottom: 10px;
    font-style: italic;
    opacity: 0.8;
}

/* Author Role (for anonymous) */
.author-role {
    color: var(--accent-secondary);
    font-size: 0.75rem;
    font-style: italic;
    opacity: 0.7;
}

/* Stats Grid */
.author-stats-grid {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 100%;
    margin-top: 8px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 0, 51, 0.15);
}

.stat-item {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    padding: 2px 0;
}

.stat-label {
    color: var(--text-muted);
}

.stat-value {
    color: var(--accent-primary);
    font-weight: bold;
}

.stat-value.likes {
    color: #ff6b6b;
}

.author-name {
    color: var(--accent-orange);
    font-weight: bold;
    margin-bottom: 12px;
    word-break: break-word;
    animation: author-glow 2s ease-in-out infinite;
    letter-spacing: 1px;
}

.author-name-link {
    color: var(--accent-orange);
    font-weight: bold;
    margin-bottom: 6px;
    word-break: break-word;
    animation: author-glow 2s ease-in-out infinite;
    letter-spacing: 1px;
    text-decoration: none;
    display: block;
    transition: all 0.2s;
    font-size: 0.95rem;
}

.author-name-link:hover {
    color: #fff;
    text-shadow: 0 0 20px rgba(255, 102, 0, 0.9);
}

.author-name.anonymous {
    color: var(--accent-secondary);
    font-style: italic;
    animation: none;
    text-shadow: 0 0 8px rgba(0, 255, 65, 0.4);
    margin-bottom: 6px;
}

.author-stats {
    color: var(--text-muted);
    font-size: 0.75em;
    line-height: 1.8;
    letter-spacing: 0.5px;
}

.post-content-panel {
    flex: 1;
    padding: 25px;
    background: linear-gradient(90deg, transparent 0%, rgba(0, 0, 0, 0.2) 100%);
}

.post-meta {
    color: var(--text-muted);
    font-size: 0.75em;
    margin-bottom: 18px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 0, 51, 0.15);
    letter-spacing: 1px;
}

.post-content {
    color: var(--text-primary);
    line-height: 1.9;
    word-wrap: break-word;
}

.reply-form-container {
    background: linear-gradient(180deg, #111 0%, #0a0a0a 100%);
    border: 1px solid rgba(255, 0, 51, 0.3);
    padding: 35px;
    margin-top: 35px;
    box-shadow: 0 0 30px rgba(255, 0, 51, 0.1), inset 0 0 20px rgba(0, 0, 0, 0.3);
}

.reply-form-container h3 {
    color: var(--text-primary);
    margin-bottom: 25px;
    letter-spacing: 2px;
    text-shadow: 0 0 10px rgba(255, 0, 51, 0.3);
}

.reply-form-container textarea {
    min-height: 150px;
    background: linear-gradient(180deg, #0a0a0a 0%, #050505 100%);
    border: 1px solid #333;
    color: #e0e0e0;
    transition: all 0.3s ease;
}

.reply-form-container textarea:focus {
    border-color: rgba(255, 0, 51, 0.6);
    box-shadow: 0 0 15px rgba(255, 0, 51, 0.2);
    outline: none;
}

.login-prompt {
    background: linear-gradient(180deg, #0a0a0a 0%, #050505 100%);
    border: 1px solid rgba(255, 0, 51, 0.2);
    padding: 25px;
    text-align: center;
    margin-top: 35px;
    color: var(--text-secondary);
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.4);
}

.login-prompt a {
    color: var(--accent-primary);
    text-decoration: none;
    text-shadow: 0 0 10px rgba(255, 0, 51, 0.4);
    transition: all 0.3s ease;
}

.login-prompt a:hover {
    text-shadow: 0 0 20px rgba(255, 0, 51, 0.8);
}

.error-message {
    background: linear-gradient(135deg, #1a0000 0%, #0a0000 100%);
    border: 1px solid #ff0000;
    color: #ff4444;
    padding: 18px;
    margin-bottom: 25px;
    box-shadow: 0 0 15px rgba(255, 0, 0, 0.2);
    text-shadow: 0 0 5px rgba(255, 68, 68, 0.5);
}

/* ============================================
   DELETE & PRIVACY CONTROLS
   ============================================ */

.thread-actions {
    display: inline-block;
    margin-left: 10px;
}

.btn-delete,
.btn-schedule,
.btn-delete-post {
    color: #ff4444;
    text-decoration: none;
    font-size: 0.85em;
    padding: 4px 10px;
    border: 1px solid rgba(255, 68, 68, 0.3);
    background: rgba(255, 0, 0, 0.05);
    transition: all 0.3s ease;
    margin-left: 5px;
}

.btn-delete:hover,
.btn-schedule:hover,
.btn-delete-post:hover {
    background: rgba(255, 0, 0, 0.2);
    border-color: #ff4444;
    box-shadow: 0 0 15px rgba(255, 0, 0, 0.3);
    text-shadow: 0 0 5px rgba(255, 68, 68, 0.5);
}

.btn-schedule {
    color: var(--accent-orange);
    border-color: rgba(255, 102, 0, 0.3);
    background: rgba(255, 102, 0, 0.05);
}

.btn-schedule:hover {
    background: rgba(255, 102, 0, 0.2);
    border-color: var(--accent-orange);
    box-shadow: 0 0 15px rgba(255, 102, 0, 0.3);
}

.post-actions {
    margin-top: 15px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 0, 51, 0.1);
    display: flex;
    gap: 8px;
}

.btn-delete-post {
    color: #ff4444 !important;
    text-decoration: none !important;
    font-size: 0.75em;
    padding: 3px 8px;
    border: 1px solid rgba(255, 68, 68, 0.3);
    background: rgba(255, 0, 0, 0.05);
    cursor: pointer;
    display: inline-block;
}

.btn-delete-post:hover {
    background: rgba(255, 0, 0, 0.2);
    border-color: #ff4444;
    box-shadow: 0 0 15px rgba(255, 0, 0, 0.3);
}

.btn-edit-post {
    color: #00ff41;
    text-decoration: none;
    font-size: 0.75em;
    padding: 3px 8px;
    border: 1px solid rgba(0, 255, 65, 0.3);
    background: rgba(0, 255, 65, 0.05);
    transition: all 0.3s ease;
}

.btn-edit-post:hover {
    background: rgba(0, 255, 65, 0.2);
    border-color: #00ff41;
    box-shadow: 0 0 15px rgba(0, 255, 65, 0.3);
    text-shadow: 0 0 5px rgba(0, 255, 65, 0.5);
}

/* Edited notice at bottom of post */
.post-edited-notice {
    margin-top: 20px;
    padding-top: 10px;
    border-top: 1px dashed rgba(255, 102, 0, 0.2);
    text-align: right;
    font-size: 0.7em;
    color: #666;
    font-style: italic;
    letter-spacing: 0.5px;
}

/* ============================================================================
   EDIT FORM
   ============================================================================ */

.edit-form-container {
    background: linear-gradient(180deg, #111 0%, #0a0a0a 100%);
    border: 1px solid rgba(0, 255, 65, 0.3);
    padding: 35px;
    margin-top: 25px;
    box-shadow: 0 0 30px rgba(0, 255, 65, 0.1), inset 0 0 20px rgba(0, 0, 0, 0.3);
}

.edit-form-container textarea {
    min-height: 200px;
    width: 100%;
    background: linear-gradient(180deg, #0a0a0a 0%, #050505 100%);
    border: 1px solid #333;
    color: #e0e0e0;
    padding: 15px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
    resize: vertical;
    transition: all 0.3s ease;
}

.edit-form-container textarea:focus {
    border-color: rgba(0, 255, 65, 0.6);
    box-shadow: 0 0 15px rgba(0, 255, 65, 0.2);
    outline: none;
}

.form-actions {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.btn-cancel {
    background: transparent;
    border: 1px solid #444;
    color: #888;
    padding: 12px 25px;
    font-family: 'Courier New', monospace;
    text-decoration: none;
    transition: all 0.3s ease;
    letter-spacing: 1px;
}

.btn-cancel:hover {
    border-color: #ff4444;
    color: #ff4444;
    box-shadow: 0 0 10px rgba(255, 68, 68, 0.3);
}

.error-message {
    background: rgba(255, 0, 0, 0.1);
    border: 1px solid #ff4444;
    color: #ff4444;
    padding: 15px;
    margin-bottom: 20px;
    text-align: center;
}

.success-message {
    background: rgba(0, 255, 65, 0.1);
    border: 1px solid #00ff41;
    color: #00ff41;
    padding: 15px;
    margin-bottom: 20px;
    text-align: center;
}

@media (max-width: 768px) {
    .post {
        flex-direction: column;
    }
    
    .post-author-panel {
        width: 100%;
        border-right: none;
        border-bottom: 3px solid var(--accent-primary);
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px;
        padding: 15px;
    }
    
    .author-avatar-img,
    .author-avatar-default,
    .anonymous-avatar {
        width: 80px;
        height: 80px;
        font-size: 2rem;
    }
    
    .author-stats-grid {
        flex-direction: row;
        gap: 15px;
        border-top: none;
        padding-top: 0;
        margin-top: 0;
    }
    
    .stat-item {
        gap: 5px;
    }
}

/* ============================================================================
   EXTERNAL LINK WARNING STYLES - Quantum Digital Shaking
   ============================================================================ */

/* External link base style */
.external-link {
    color: #ff6600;
    text-decoration: none;
    padding: 2px 8px;
    border-radius: 3px;
    background: rgba(255, 0, 51, 0.1);
    border: 1px solid rgba(255, 0, 51, 0.3);
    position: relative;
    display: inline-block;
    transition: all 0.2s ease;
    animation: link-quantum-shake 4s ease-in-out infinite;
}

/* Quantum digital shake */
@keyframes link-quantum-shake {
    0%, 85%, 100% { 
        transform: translate(0); 
        filter: none;
    }
    86% { 
        transform: translate(-1px, 0); 
        filter: hue-rotate(30deg) brightness(1.2);
    }
    87% { 
        transform: translate(1px, -1px); 
        filter: hue-rotate(-30deg);
    }
    88% { 
        transform: translate(0, 1px); 
        filter: saturate(1.5);
    }
    89% { 
        transform: translate(-1px, -1px); 
        filter: hue-rotate(60deg) brightness(1.3);
    }
    90% { 
        transform: translate(1px, 0); 
        filter: none;
    }
}

.external-link:hover {
    background: rgba(255, 0, 51, 0.25);
    border-color: #ff0033;
    box-shadow: 
        0 0 15px rgba(255, 0, 51, 0.4),
        0 0 30px rgba(255, 0, 51, 0.2);
    animation: link-danger-pulse 0.3s ease-in-out infinite;
}

@keyframes link-danger-pulse {
    0%, 100% { 
        transform: scale(1); 
        box-shadow: 0 0 15px rgba(255, 0, 51, 0.4);
    }
    50% { 
        transform: scale(1.02); 
        box-shadow: 0 0 25px rgba(255, 0, 51, 0.6);
    }
}

/* Warning icon with glow */
.link-warning-icon {
    color: #ffcc00;
    font-size: 0.9em;
    margin-right: 4px;
    animation: warning-icon-flash 1.5s ease-in-out infinite;
    display: inline-block;
}

@keyframes warning-icon-flash {
    0%, 100% { 
        opacity: 0.7; 
        text-shadow: 0 0 5px rgba(255, 204, 0, 0.5);
    }
    50% { 
        opacity: 1; 
        text-shadow: 0 0 15px rgba(255, 204, 0, 0.9), 0 0 25px rgba(255, 102, 0, 0.5);
    }
}

/* Digital glitch on hover */
.external-link::before {
    content: '⚠ EXTERNAL';
    position: absolute;
    top: -22px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.65em;
    color: #ff0033;
    background: rgba(0, 0, 0, 0.95);
    padding: 2px 8px;
    border: 1px solid rgba(255, 0, 51, 0.5);
    border-radius: 2px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    letter-spacing: 1px;
    text-transform: uppercase;
    box-shadow: 0 0 10px rgba(255, 0, 51, 0.3);
}

.external-link:hover::before {
    opacity: 1;
    animation: tooltip-glitch 0.5s ease-in-out infinite;
}

@keyframes tooltip-glitch {
    0%, 100% { 
        transform: translateX(-50%) translateY(0); 
    }
    25% { 
        transform: translateX(-51%) translateY(-1px); 
    }
    50% { 
        transform: translateX(-49%) translateY(1px); 
    }
    75% { 
        transform: translateX(-50%) translateY(-1px); 
    }
}

/* Digital scan effect */
.external-link::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 0, 51, 0.1) 50%,
        transparent 100%
    );
    transform: translateX(-100%);
    pointer-events: none;
}

.external-link:hover::after {
    animation: link-scan 1s linear infinite;
}

@keyframes link-scan {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Internal link - safe */
.internal-link {
    color: #00ff41;
    text-decoration: none;
    border-bottom: 1px dotted rgba(0, 255, 65, 0.4);
    transition: all 0.3s ease;
}

.internal-link:hover {
    text-shadow: 0 0 10px rgba(0, 255, 65, 0.6);
    border-bottom-color: #00ff41;
}

/* ========================================
   LIKES SYSTEM
   ======================================== */
.like-inline {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-left: 12px;
}

.like-count {
    color: #FFD700;
    font-size: 0.85em;
    min-width: 16px;
    text-align: center;
}

.like-btn {
    background: transparent;
    border: none;
    color: #555;
    font-size: 1.2em;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 2px 6px;
}

.like-btn:hover:not(.disabled) {
    color: #FFD700;
    transform: scale(1.2);
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.6);
}

.like-btn.liked {
    color: #FFD700;
    text-shadow: 0 0 8px rgba(255, 215, 0, 0.5);
}

.like-btn.disabled {
    opacity: 0.3;
    cursor: default;
}

.like-btn.pulse {
    animation: like-pulse 0.3s ease;
}

@keyframes like-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.4); }
}

/* ========================================
   QUOTE BUTTON
   ======================================== */
.quote-btn {
    background: transparent;
    border: 1px solid rgba(100, 100, 100, 0.3);
    color: #888;
    font-size: 0.8em;
    cursor: pointer;
    padding: 2px 8px;
    margin-left: 12px;
    border-radius: 3px;
    transition: all 0.3s ease;
    letter-spacing: 0.5px;
}

.quote-btn:hover {
    color: var(--accent-primary);
    border-color: var(--accent-primary);
    box-shadow: 0 0 8px rgba(255, 0, 51, 0.3);
}

/* ========================================
   QUOTE BLOCK STYLING
   ======================================== */
.quote-block {
    background: linear-gradient(180deg, rgba(255, 102, 0, 0.08) 0%, rgba(255, 0, 51, 0.05) 100%);
    border-left: 3px solid var(--accent-orange);
    padding: 12px 16px;
    margin: 12px 0;
    position: relative;
    font-style: italic;
    color: #bbb;
}

.quote-block::before {
    content: '"';
    position: absolute;
    top: 5px;
    left: 8px;
    font-size: 2em;
    color: var(--accent-orange);
    opacity: 0.3;
}

.quote-author {
    color: var(--accent-orange);
    font-weight: bold;
    font-size: 0.85em;
    margin-bottom: 6px;
    font-style: normal;
}
