/* Enhanced Thread Detail Styles */
.thread-detail-container {
    background-color: #1a1a1a;
    padding: 2rem;
    border-radius: 12px;
    margin-top: 0;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    border: 1px solid #333;
}

/* Enhanced Thread Hero Header */
.thread-hero-header {
    position: relative;
    height: 500px;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 50%, #0a0a0a 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-top: 80px;
}

.thread-hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Animated Pulse Rings */
.thread-pulse-rings {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pulse-ring {
    position: absolute;
    border: 2px solid rgba(255, 0, 0, 0.3);
    border-radius: 50%;
    animation: threadPulse 4s ease-in-out infinite;
}

.pulse-ring-1 {
    width: 200px;
    height: 200px;
    animation-delay: 0s;
}

.pulse-ring-2 {
    width: 300px;
    height: 300px;
    animation-delay: 1.3s;
}

.pulse-ring-3 {
    width: 400px;
    height: 400px;
    animation-delay: 2.6s;
}

@keyframes threadPulse {
    0%, 100% { 
        transform: scale(1);
        opacity: 0.3;
    }
    50% { 
        transform: scale(1.1);
        opacity: 0.6;
    }
}

/* Thread Stats Overlay */
.thread-stats-overlay {
    position: absolute;
    top: 2rem;
    right: 2rem;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    z-index: 2;
}

.stat-item {
    background: rgba(0, 0, 0, 0.8);
    border: 1px solid rgba(255, 0, 0, 0.3);
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
    backdrop-filter: blur(10px);
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: bold;
    color: #ff0000;
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.8rem;
    color: #ccc;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Thread Hero Content */
.thread-hero-content {
    position: relative;
    z-index: 3;
    text-align: center;
    color: white;
    max-width: 900px;
    padding: 0 2rem;
}

.thread-location-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 0, 0, 0.2);
    border: 1px solid rgba(255, 0, 0, 0.5);
    border-radius: 25px;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    color: #ff0000;
    margin-bottom: 1rem;
    backdrop-filter: blur(10px);
}

.thread-hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin: 0 0 1.5rem 0;
    text-shadow: 0 0 30px rgba(255, 0, 0, 0.3);
    letter-spacing: 0.05em;
    line-height: 1.2;
}

.thread-meta-banner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 0, 0, 0.1);
    border: 1px solid rgba(255, 0, 0, 0.3);
    border-radius: 12px;
    padding: 1.5rem;
    backdrop-filter: blur(10px);
    max-width: 800px;
    margin: 0 auto;
}

.thread-author-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.author-avatar {
    width: 60px;
    height: 60px;
    background: #ff0000;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
}

.author-details {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    text-align: left;
}

.author-label {
    font-size: 0.8rem;
    color: #ccc;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.author-name {
    font-size: 1.3rem;
    font-weight: 600;
    color: #ff0000;
    text-decoration: none;
    transition: color 0.3s ease;
}

.author-name:hover {
    color: #cc0000;
}

.thread-date {
    font-size: 0.9rem;
    color: #888;
}

.thread-actions {
    display: flex;
    gap: 1rem;
}

.back-to-city-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.back-to-city-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* Thread Content Section */
.thread-content-section {
    margin-bottom: 3rem;
}

.thread-original-post {
    background: linear-gradient(145deg, #1a1a1a 0%, #222 100%);
    border: 1px solid #333;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    position: relative;
}

.post-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #333;
}

.post-author-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 0, 0, 0.1);
    border: 1px solid rgba(255, 0, 0, 0.3);
    border-radius: 20px;
    padding: 0.5rem 1rem;
    color: #ff0000;
    font-size: 0.9rem;
    font-weight: 500;
}

.post-timestamp {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #888;
    font-size: 0.9rem;
}

.post-timestamp i {
    color: #ff0000;
}

.post-content {
    color: #ccc;
    line-height: 1.7;
    font-size: 1.1rem;
}

/* Replies Section */
.thread-replies-section {
    margin-bottom: 3rem;
}

.replies-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #333;
}

.section-title {
    font-size: 1.8rem;
    color: #ff0000;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.replies-filter {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.filter-label {
    color: #ccc;
    font-size: 0.9rem;
}

.replies-sort {
    background: #333;
    border: 1px solid #444;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.9rem;
}

/* Enhanced Replies List */
.replies-list {
    list-style: none;
    padding: 0;
    margin-bottom: 2rem;
}

.reply-item {
    background: linear-gradient(145deg, #1a1a1a 0%, #222 100%);
    border: 1px solid #333;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.reply-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 0, 0, 0.3);
}

.reply-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 1.5rem 1rem 1.5rem;
    border-bottom: 1px solid #333;
}

.reply-author-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.reply-author-avatar {
    width: 50px;
    height: 50px;
    background: rgba(255, 0, 0, 0.1);
    border: 2px solid rgba(255, 0, 0, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ff0000;
    font-size: 1.2rem;
}

.reply-author-details {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.reply-author-name {
    color: #ff0000;
    font-weight: 600;
    text-decoration: none;
    font-size: 1.1rem;
    transition: color 0.3s ease;
}

.reply-author-name:hover {
    color: #cc0000;
}

.reply-timestamp {
    color: #888;
    font-size: 0.85rem;
}

.reply-actions {
    display: flex;
    gap: 0.5rem;
}

.reply-action-btn {
    background: rgba(255, 0, 0, 0.1);
    border: 1px solid rgba(255, 0, 0, 0.3);
    color: #ff0000;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.reply-action-btn:hover {
    background: rgba(255, 0, 0, 0.2);
    transform: scale(1.1);
}

.reply-content {
    padding: 1rem 1.5rem 1.5rem 1.5rem;
    color: #ccc;
    line-height: 1.6;
    font-size: 1rem;
}

/* No Replies State */
.no-replies-state {
    text-align: center;
    padding: 3rem;
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.empty-state i {
    font-size: 3rem;
    color: #444;
}

.empty-state h3 {
    color: #666;
    margin: 0;
}

.empty-state p {
    color: #888;
    margin: 0;
}

/* Enhanced Pagination */
.enhanced-pagination {
    background: linear-gradient(145deg, #1a1a1a 0%, #222 100%);
    border: 1px solid #333;
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.pagination-info {
    color: #ccc;
    font-size: 0.9rem;
}

.pagination-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pagination-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: #333;
    border: 1px solid #444;
    color: #ccc;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.pagination-btn:hover {
    background: #ff0000;
    color: white;
    border-color: #ff0000;
    transform: translateY(-2px);
}

.current-page {
    background: rgba(255, 0, 0, 0.1);
    border: 1px solid rgba(255, 0, 0, 0.3);
    color: #ff0000;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
}

/* Reply Form Section */
.reply-form-section {
    background: linear-gradient(145deg, #1a1a1a 0%, #222 100%);
    border: 1px solid #333;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.form-header {
    margin-bottom: 2rem;
}

.form-tips {
    margin-top: 1rem;
}

.tip-item {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 0, 0, 0.1);
    border: 1px solid rgba(255, 0, 0, 0.3);
    color: #ff0000;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
}

.enhanced-reply-form {
    margin-top: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    color: #ccc;
    margin-bottom: 0.75rem;
    font-weight: 500;
    font-size: 1rem;
}

.enhanced-reply-form textarea {
    width: 100%;
    padding: 1.5rem;
    background: #333;
    border: 1px solid #444;
    color: white;
    border-radius: 8px;
    font-size: 1rem;
    min-height: 120px;
    resize: vertical;
    transition: border-color 0.3s ease;
    line-height: 1.6;
}

.enhanced-reply-form textarea:focus {
    outline: none;
    border-color: #ff0000;
    box-shadow: 0 0 0 3px rgba(255, 0, 0, 0.1);
}

.form-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
}

.character-count {
    color: #888;
    font-size: 0.9rem;
}

.submit-reply-button {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    background: #ff0000;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
    font-weight: 600;
}

.submit-reply-button:hover {
    background: #cc0000;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 0, 0, 0.2);
}

/* Login Prompt */
.login-prompt {
    background: linear-gradient(145deg, #1a1a1a 0%, #222 100%);
    border: 1px solid #333;
    border-radius: 12px;
    padding: 3rem;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.login-prompt-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.login-prompt i {
    font-size: 3rem;
    color: #ff0000;
}

.login-prompt h3 {
    color: white;
    margin: 0;
    font-size: 1.5rem;
}

.login-prompt p {
    color: #ccc;
    margin: 0;
    font-size: 1rem;
}

.login-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    background: #ff0000;
    color: white;
    padding: 1rem 2rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    margin-top: 1rem;
}

.login-btn:hover {
    background: #cc0000;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 0, 0, 0.2);
}

/* Notification System */
.notification {
    position: fixed;
    top: 2rem;
    right: 2rem;
    background: #333;
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    border-left: 4px solid #ff0000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    transform: translateX(400px);
    transition: transform 0.3s ease;
    z-index: 1000;
    max-width: 300px;
}

.notification.show {
    transform: translateX(0);
}

.notification-error {
    border-left-color: #ff4444;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .thread-hero-header {
        height: 400px;
        padding: 1rem;
    }
    
    .thread-hero-title {
        font-size: 2.5rem;
        line-height: 1.1;
    }
    
    .thread-stats-overlay {
        position: relative;
        top: auto;
        right: auto;
        margin-top: 2rem;
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
        width: 100%;
        max-width: 400px;
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
    
    .thread-meta-banner {
        flex-direction: column;
        gap: 1.5rem;
        text-align: center;
        padding: 1rem;
    }
    
    .thread-author-info {
        justify-content: center;
    }
    
    .thread-actions {
        justify-content: center;
    }
    
    .thread-detail-container {
        padding: 1rem;
        margin-bottom: 3rem;
    }
    
    .thread-original-post {
        padding: 1.5rem;
    }
    
    .post-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .post-timestamp {
        align-self: flex-end;
    }
    
    .replies-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .replies-filter {
        width: 100%;
        justify-content: flex-start;
    }
    
    .replies-sort {
        min-width: 150px;
    }
    
    .reply-item {
        margin-bottom: 1rem;
    }
    
    .reply-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
        padding: 1rem 1rem 0.75rem 1rem;
    }
    
    .reply-actions {
        align-self: flex-end;
    }
    
    .reply-content {
        padding: 0.75rem 1rem 1rem 1rem;
    }
    
    .enhanced-pagination {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
        padding: 1rem;
    }
    
    .pagination-controls {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .reply-form-section {
        padding: 1.5rem;
    }
    
    .form-header {
        text-align: center;
    }
    
    .form-tips {
        text-align: center;
    }
    
    .form-footer {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .submit-reply-button {
        width: 100%;
        justify-content: center;
    }
    
    .login-prompt {
        padding: 2rem 1rem;
    }
}

@media (max-width: 480px) {
    .thread-hero-header {
        height: 350px;
        padding: 0.5rem;
    }
    
    .thread-hero-title {
        font-size: 2rem;
        margin-bottom: 1rem;
    }
    
    .thread-stats-overlay {
        grid-template-columns: 1fr;
        gap: 0.75rem;
        margin-top: 1.5rem;
    }
    
    .stat-item {
        padding: 0.75rem;
    }
    
    .stat-number {
        font-size: 1.25rem;
    }
    
    .thread-location-badge {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }
    
    .thread-meta-banner {
        padding: 1rem;
        gap: 1rem;
    }
    
    .author-avatar {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
    
    .author-name {
        font-size: 1.1rem;
    }
    
    .back-to-city-btn {
        padding: 0.6rem 0.8rem;
        font-size: 0.85rem;
    }
    
    .thread-detail-container {
        padding: 0.75rem;
    }
    
    .thread-original-post {
        padding: 1rem;
    }
    
    .post-content {
        font-size: 1rem;
        line-height: 1.6;
    }
    
    .replies-header {
        margin-bottom: 1.5rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .reply-item {
        margin-bottom: 0.75rem;
    }
    
    .reply-header {
        padding: 0.75rem 0.75rem 0.5rem 0.75rem;
    }
    
    .reply-author-avatar {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .reply-author-name {
        font-size: 1rem;
    }
    
    .reply-content {
        padding: 0.5rem 0.75rem 0.75rem 0.75rem;
        font-size: 0.95rem;
    }
    
    .reply-action-btn {
        width: 35px;
        height: 35px;
        font-size: 0.9rem;
    }
    
    .enhanced-pagination {
        padding: 1rem;
    }
    
    .pagination-btn {
        width: 35px;
        height: 35px;
        font-size: 0.9rem;
    }
    
    .current-page {
        padding: 0.4rem 0.8rem;
        font-size: 0.85rem;
    }
    
    .reply-form-section {
        padding: 1rem;
    }
    
    .enhanced-reply-form textarea {
        padding: 1rem;
        min-height: 100px;
        font-size: 0.95rem;
    }
    
    .form-group label {
        font-size: 0.95rem;
    }
    
    .submit-reply-button {
        padding: 0.8rem 1.5rem;
        font-size: 0.95rem;
    }
    
    .login-prompt {
        padding: 1.5rem 0.75rem;
    }
    
    .login-prompt h3 {
        font-size: 1.3rem;
    }
    
    .login-btn {
        padding: 0.8rem 1.5rem;
        font-size: 0.95rem;
    }
}

@media (max-width: 360px) {
    .thread-hero-header {
        height: 300px;
    }
    
    .thread-hero-title {
        font-size: 1.75rem;
    }
    
    .thread-meta-banner {
        padding: 0.75rem;
    }
    
    .author-avatar {
        width: 45px;
        height: 45px;
    }
    
    .author-name {
        font-size: 1rem;
    }
    
    .back-to-city-btn {
        padding: 0.5rem 0.7rem;
        font-size: 0.8rem;
    }
    
    .thread-detail-container {
        padding: 0.5rem;
    }
    
    .thread-original-post {
        padding: 0.75rem;
    }
    
    .reply-item {
        padding: 0.5rem;
    }
    
    .reply-header {
        padding: 0.5rem 0.5rem 0.25rem 0.5rem;
    }
    
    .reply-content {
        padding: 0.25rem 0.5rem 0.5rem 0.5rem;
    }
    
    .enhanced-pagination {
        padding: 0.75rem;
    }
    
    .reply-form-section {
        padding: 0.75rem;
    }
    
    .login-prompt {
        padding: 1rem 0.5rem;
    }
}
