/* Threads Page Styles */
.threads-section {
    min-height: 100vh;
    padding: 120px 0 80px;
    background: var(--bg-light);
}

.threads-header {
    text-align: center;
    margin-bottom: 3rem;
}

.threads-header h1 {
    font-size: 3rem;
    font-weight: 800;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
}

.threads-header p {
    font-size: 1.25rem;
    color: var(--text-light);
}

/* User Status Bar */
.user-status {
    background: white;
    padding: 1.5rem;
    border-radius: 15px;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-sm);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--gradient-1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 1.5rem;
}

.user-details h3 {
    color: var(--primary-blue);
    margin-bottom: 0.25rem;
    font-size: 1.1rem;
}

.user-details p {
    color: var(--text-light);
    font-size: 0.9rem;
}

.auth-buttons {
    display: flex;
    gap: 1rem;
}

.btn-login, .btn-signup, .btn-logout {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-login {
    background: white;
    color: var(--primary-blue);
    border: 2px solid var(--primary-blue);
}

.btn-login:hover {
    background: var(--primary-blue);
    color: white;
}

.btn-signup {
    background: var(--gradient-1);
    color: white;
}

.btn-signup:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(37, 99, 235, 0.3);
}

.btn-logout {
    background: #ef4444;
    color: white;
}

.btn-logout:hover {
    background: #dc2626;
}

/* Create Post Area */
.create-post-area {
    margin-bottom: 2rem;
}

.btn-create-post {
    width: 100%;
    padding: 1.5rem;
    background: white;
    border: 2px dashed var(--primary-blue);
    border-radius: 15px;
    color: var(--primary-blue);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-create-post:hover {
    background: var(--gradient-1);
    color: white;
    border-color: transparent;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Posts Container */
.posts-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.post-card {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    cursor: pointer;
    border-left: 5px solid var(--primary-blue);
}

.post-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.post-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.post-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-blue);
    margin-bottom: 0.5rem;
}

.post-meta {
    display: flex;
    gap: 1.5rem;
    color: var(--text-light);
    font-size: 0.9rem;
}

.post-author {
    font-weight: 600;
    color: var(--primary-blue);
}

.post-excerpt {
    color: var(--text-dark);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.post-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.comment-count {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-light);
    font-size: 0.9rem;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    border-radius: 20px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease;
}

.modal-large {
    max-width: 800px;
}

.modal-header {
    padding: 2rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    color: var(--primary-blue);
    font-size: 1.75rem;
    font-weight: 700;
}

.close {
    font-size: 2rem;
    font-weight: 300;
    color: var(--text-light);
    cursor: pointer;
    transition: color 0.3s ease;
}

.close:hover {
    color: var(--primary-blue);
}

.modal-body {
    padding: 2rem;
}

/* Form Styles */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
    font-weight: 600;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-blue);
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
}

.btn-secondary {
    padding: 0.75rem 1.5rem;
    background: var(--bg-light);
    color: var(--text-dark);
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: var(--border-color);
}

/* Post Detail */
.post-detail {
    margin-bottom: 2rem;
}

.post-detail .post-meta {
    margin-bottom: 1.5rem;
}

.post-detail .post-content {
    color: var(--text-dark);
    line-height: 1.8;
    font-size: 1.05rem;
}

/* Comments Section */
.comments-section {
    border-top: 2px solid var(--border-color);
    padding-top: 2rem;
    margin-top: 2rem;
}

.comments-section h3 {
    color: var(--primary-blue);
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.add-comment-form {
    margin-bottom: 2rem;
}

.add-comment-form textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    margin-bottom: 1rem;
    font-family: inherit;
}

.add-comment-form textarea:focus {
    outline: none;
    border-color: var(--primary-blue);
}

.comments-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.comment-card {
    background: var(--bg-light);
    padding: 1.5rem;
    border-radius: 12px;
    border-left: 3px solid var(--bright-cyan);
}

.comment-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.comment-author {
    font-weight: 600;
    color: var(--primary-blue);
}

.comment-date {
    color: var(--text-light);
    font-size: 0.85rem;
}

.comment-content {
    color: var(--text-dark);
    line-height: 1.6;
}

/* Loading & Empty States */
.loading, .empty-state {
    text-align: center;
    padding: 3rem;
    color: var(--text-light);
    font-size: 1.1rem;
}

.empty-state {
    background: white;
    border-radius: 15px;
    box-shadow: var(--shadow-sm);
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .threads-header h1 {
        font-size: 2rem;
    }

    .user-status {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .post-header {
        flex-direction: column;
    }

    .post-meta {
        flex-direction: column;
        gap: 0.5rem;
    }

    .modal-content {
        width: 95%;
        max-height: 95vh;
    }

    .modal-body {
        padding: 1.5rem;
    }

    .form-actions {
        flex-direction: column;
    }

    .btn-secondary, .form-actions button {
        width: 100%;
    }
}