/* Announcements & Updates System Styles */

/* === Updates Page Timeline === */
.updates-timeline {
    position: relative;
    padding-left: 30px;
}

.updates-timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, #667eea, transparent);
}

.update-card {
    position: relative;
    background-color: #1a1a2e;
    border: 1px solid #2a2a3e;
    border-radius: 8px;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.update-card::before {
    content: '';
    position: absolute;
    left: -36px;
    top: 24px;
    width: 12px;
    height: 12px;
    background: #667eea;
    border: 3px solid #1a1a2e;
    border-radius: 50%;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

.update-card:hover {
    border-color: #667eea;
    transform: translateX(5px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.2);
}

.update-header h3 {
    margin: 0;
    font-size: 1.5rem;
}

.update-content {
    line-height: 1.8;
}

/* === Markdown Content Styling === */
.markdown-content h1,
.markdown-content h2,
.markdown-content h3,
.markdown-content h4 {
    color: #fff;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
}

.markdown-content h1 { font-size: 2rem; }
.markdown-content h2 { font-size: 1.75rem; }
.markdown-content h3 { font-size: 1.5rem; }
.markdown-content h4 { font-size: 1.25rem; }

.markdown-content p {
    margin-bottom: 1rem;
}

.markdown-content ul,
.markdown-content ol {
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}

.markdown-content li {
    margin-bottom: 0.5rem;
}

.markdown-content code {
    background-color: #2a2a3e;
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-size: 0.9em;
    color: #f8f9fa;
    font-family: 'Courier New', Courier, monospace;
}

.markdown-content pre {
    background-color: #2a2a3e;
    padding: 1rem;
    border-radius: 5px;
    overflow-x: auto;
    margin-bottom: 1rem;
}

.markdown-content pre code {
    background: none;
    padding: 0;
}

.markdown-content a {
    color: #667eea;
    text-decoration: none;
}

.markdown-content a:hover {
    color: #764ba2;
    text-decoration: underline;
}

.markdown-content blockquote {
    border-left: 4px solid #667eea;
    padding-left: 1rem;
    margin-left: 0;
    color: #b4b4b4;
    font-style: italic;
}

.markdown-content hr {
    border: 0;
    border-top: 1px solid #2a2a3e;
    margin: 2rem 0;
}

.markdown-content img {
    max-width: 100%;
    height: auto;
    border-radius: 5px;
    margin: 1rem 0;
}

.markdown-content table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1rem;
}

.markdown-content table th,
.markdown-content table td {
    border: 1px solid #2a2a3e;
    padding: 0.5rem;
    text-align: left;
}

.markdown-content table th {
    background-color: #2a2a3e;
    font-weight: bold;
}

/* === Announcement Modal === */
#announcementModal .modal-content {
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

#announcementModal .announcement-item:not(:last-child) {
    margin-bottom: 2rem;
}

#announcementModal .announcement-body {
    font-size: 0.95rem;
    line-height: 1.6;
}

/* === NEW Badge in Sidebar === */
.updates-badge {
    display: inline-block;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-size: 0.65rem;
    font-weight: bold;
    padding: 0.15rem 0.4rem;
    border-radius: 10px;
    margin-left: 0.5rem;
    vertical-align: middle;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.05);
    }
}

/* === Responsive === */
@media (max-width: 768px) {
    .updates-timeline {
        padding-left: 20px;
    }

    .update-card::before {
        left: -26px;
    }

    .update-card {
        padding: 1rem;
    }

    .update-header h3 {
        font-size: 1.25rem;
    }
}

/* === Dark Theme Enhancements === */
.form-control:focus,
.form-select:focus {
    background-color: #2a2a3e !important;
    border-color: #667eea !important;
    color: white !important;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25) !important;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #5568d3 0%, #653a8b 100%);
}
