/* Authentication Modal Styles */
.auth-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: #fff;
    border-radius: 12px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid #eee;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
    color: #333;
    font-weight: 600;
}

.close-modal {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #999;
    transition: color 0.2s;
}

.close-modal:hover {
    color: #333;
}

.modal-body {
    padding: 25px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #333;
    font-size: 14px;
}

.form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.form-group input:focus {
    outline: none;
    border-color: #027C02;
    box-shadow: 0 0 0 2px rgba(2, 124, 2, 0.1);
}

.auth-btn {
    width: 100%;
    padding: 12px;
    background-color: #027C02;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
    margin-bottom: 15px;
}

.auth-btn:hover {
    background-color: #025a02;
}

.auth-btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

.auth-switch {
    text-align: center;
    font-size: 14px;
    color: #666;
}

.auth-switch a {
    color: #027C02;
    text-decoration: none;
    font-weight: 500;
}

.auth-switch a:hover {
    text-decoration: underline;
}

.error-message {
    background-color: #ffebee;
    color: #c62828;
    padding: 10px;
    border-radius: 4px;
    font-size: 14px;
    margin-top: 10px;
    display: none;
}

.error-message:not(:empty) {
    display: block;
}

/* User Menu Styles */
.user-menu {
    position: fixed;
    top: 10px;
    right: 10px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    padding: 15px;
    z-index: 999;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logout-btn {
    background: #027C02;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.logout-btn:hover {
    background: #025a02;
}

/* Enhanced Comments Styles */
.comments-section {
    margin-top: 40px;
    background: #fff;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.comments-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.comments-title {
    font-size: 1.4rem;
    font-weight: 600;
    color: #333;
}

.comments-filter {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: white;
    font-size: 14px;
    cursor: pointer;
}

.comment-list {
    list-style: none;
    padding: 0;
    margin: 0 0 25px 0;
}

.comment-item {
    padding: 20px 0;
    border-bottom: 1px solid #f0f0f0;
}

.comment-item:last-child {
    border-bottom: none;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}

.comment-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 13px;
    color: #666;
}

.comment-author {
    font-weight: 500;
    color: #333;
}

.comment-date {
    color: #999;
}

.edited-indicator {
    font-style: italic;
    color: #999;
    font-size: 12px;
}

.comment-options {
    display: flex;
    gap: 5px;
}

.comment-edit-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: #666;
    padding: 4px;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.comment-edit-btn:hover {
    background-color: #f0f0f0;
}

.comment-content {
    margin: 10px 0 15px 0;
    line-height: 1.6;
    color: #333;
    font-size: 15px;
}

.comment-actions {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 13px;
}

.vote-btn {
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    color: #666;
    padding: 6px 10px;
    border-radius: 4px;
    transition: all 0.2s;
}

.vote-btn:hover {
    background-color: #f0f0f0;
}

.vote-btn.upvote:hover {
    color: #027C02;
}

.vote-btn.downvote:hover {
    color: #dc3545;
}

.reply-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: #027C02;
    font-weight: 500;
    padding: 6px 10px;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.reply-btn:hover {
    background-color: rgba(2, 124, 2, 0.1);
}

.comment-form {
    display: flex;
    gap: 10px;
    align-items: center;
}

.comment-input {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 25px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

.comment-input:focus {
    border-color: #027C02;
}

.comment-input:disabled {
    background-color: #f5f5f5;
    cursor: not-allowed;
}

.comment-btn {
    padding: 12px 20px;
    background-color: #027C02;
    color: white;
    border: none;
    border-radius: 25px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
    white-space: nowrap;
}

.comment-btn:hover {
    background-color: #025a02;
}

.comment-btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

.no-comments {
    text-align: center;
    color: #666;
    font-style: italic;
    padding: 40px 20px;
}

.comments-error {
    text-align: center;
    color: #dc3545;
    padding: 20px;
    background-color: #ffebee;
    border-radius: 6px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        margin: 20px;
    }
    
    .modal-body {
        padding: 20px;
    }
    
    .user-menu {
        position: static;
        margin: 10px;
        display: inline-block;
    }
    
    .comments-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .comment-form {
        flex-direction: column;
        align-items: stretch;
    }
    
    .comment-btn {
        border-radius: 6px;
    }
    
    .comment-input {
        border-radius: 6px;
    }
}

@media (max-width: 480px) {
    .comment-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .comment-actions {
        flex-wrap: wrap;
        gap: 10px;
    }
}
