/* ===== Dev Blog Section ===== */
.devblog-section {
    padding: var(--space-2xl) 0;
    background: linear-gradient(to bottom, var(--bg-black), var(--bg-dark));
    position: relative;
    overflow: hidden;
}

.devblog-bg {
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(189, 0, 255, 0.05) 0%, transparent 40%),
        radial-gradient(circle at 80% 50%, rgba(255, 0, 110, 0.03) 0%, transparent 40%);
    z-index: 0;
}

.devblog-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--space-lg);
    position: relative;
    z-index: 1;
}

.devblog-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-2xl);
}

.devblog-title {
    font-family: 'Orbitron', monospace;
    font-size: 2.5rem;
    font-weight: 900;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 2px;
}

.read-more-link {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 600;
    letter-spacing: 1px;
    transition: all var(--transition-base);
}

.read-more-link:hover {
    color: var(--neon-purple);
    transform: translateX(5px);
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: var(--space-xl);
}

.news-item {
    background: rgba(17, 17, 17, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    overflow: hidden;
    transition: all var(--transition-base);
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: block;
    position: relative;
}

.news-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    border-color: rgba(189, 0, 255, 0.3);
}

.news-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: linear-gradient(135deg, rgba(189, 0, 255, 0.1), rgba(255, 0, 110, 0.1));
}

.news-content {
    padding: var(--space-lg);
}

.news-date {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: var(--space-sm);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.news-title {
    font-family: 'Orbitron', monospace;
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: var(--space-sm);
    color: var(--text-primary);
    line-height: 1.3;
}

.news-excerpt {
    color: var(--text-secondary);
    line-height: 1.6;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.news-meta {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin-top: var(--space-md);
    padding-top: var(--space-md);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.news-author {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.news-stats {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin-left: auto;
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* Upcoming Badge */
.upcoming-badge {
    position: absolute;
    top: var(--space-md);
    right: var(--space-md);
    background: var(--gradient-primary);
    color: white;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 15px rgba(189, 0, 255, 0.4);
    z-index: 10;
}

/* Skeleton Loading */
.news-skeleton {
    background: rgba(17, 17, 17, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    overflow: hidden;
    animation: pulse 1.5s ease-in-out infinite;
}

.skeleton-image {
    width: 100%;
    height: 200px;
    background: linear-gradient(90deg, 
        rgba(255, 255, 255, 0.05) 25%, 
        rgba(255, 255, 255, 0.1) 50%, 
        rgba(255, 255, 255, 0.05) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s ease-in-out infinite;
}

.skeleton-content {
    padding: var(--space-lg);
}

.skeleton-title {
    height: 24px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    margin-bottom: var(--space-sm);
}

.skeleton-date {
    height: 16px;
    width: 150px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 4px;
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* ===== News Page Styles ===== */
.news-page {
    min-height: 100vh;
    padding-top: 120px;
    padding-bottom: var(--space-2xl);
    position: relative;
    z-index: 10;
}

.news-page-header {
    text-align: center;
    margin-bottom: var(--space-2xl);
}

.news-page-title {
    font-family: 'Orbitron', monospace;
    font-size: 3.5rem;
    font-weight: 900;
    margin-bottom: var(--space-md);
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.news-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-xl);
    gap: var(--space-md);
    flex-wrap: wrap;
    position: relative;
    z-index: 100;
}

.news-filters {
    display: flex;
    gap: var(--space-sm);
}

.filter-btn {
    background: rgba(17, 17, 17, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    padding: 10px 20px;
    border-radius: 10px;
    cursor: pointer;
    transition: all var(--transition-base);
    font-weight: 500;
    position: relative;
    z-index: 100;
    pointer-events: auto !important;
}

.filter-btn:hover,
.filter-btn.active {
    background: rgba(189, 0, 255, 0.1);
    border-color: rgba(189, 0, 255, 0.3);
    color: var(--neon-purple);
}

.create-news-btn {
    background: var(--gradient-primary);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    transition: all var(--transition-base);
    box-shadow: 0 4px 20px rgba(189, 0, 255, 0.4);
    position: relative;
    z-index: 100;
    pointer-events: auto !important;
}

.create-news-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 30px rgba(189, 0, 255, 0.6);
}

.create-news-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* No news message */
.no-news {
    text-align: center;
    padding: var(--space-2xl);
    color: var(--text-secondary);
    font-size: 1.125rem;
}

.error-message {
    text-align: center;
    padding: var(--space-2xl);
    color: var(--neon-pink);
    font-size: 1.125rem;
}

/* News Detail Styles */
.news-detail {
    max-width: 900px;
    margin: 0 auto;
    background: rgba(17, 17, 17, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.news-detail-image {
    width: 100%;
    height: 400px;
    object-fit: cover;
}

.news-detail-content {
    padding: var(--space-2xl);
}

.news-detail-header {
    margin-bottom: var(--space-xl);
}

.news-detail-title {
    font-family: 'Orbitron', monospace;
    font-size: 2.5rem;
    font-weight: 900;
    margin-bottom: var(--space-md);
    line-height: 1.2;
}

.news-detail-meta {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.news-detail-body {
    color: var(--text-primary);
    line-height: 1.8;
    font-size: 1.1rem;
}

/* Rich Text Content */
.news-detail-body h1,
.news-detail-body h2,
.news-detail-body h3,
.news-detail-body h4 {
    font-family: 'Orbitron', monospace;
    margin: var(--space-lg) 0 var(--space-md);
    color: var(--text-primary);
}

.news-detail-body h1 { font-size: 2rem; }
.news-detail-body h2 { font-size: 1.75rem; }
.news-detail-body h3 { font-size: 1.5rem; }
.news-detail-body h4 { font-size: 1.25rem; }

.news-detail-body p {
    margin-bottom: var(--space-md);
}

.news-detail-body img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: var(--space-lg) 0;
}

.news-detail-body ul,
.news-detail-body ol {
    margin: var(--space-md) 0;
    padding-left: var(--space-lg);
}

.news-detail-body li {
    margin-bottom: var(--space-sm);
}

.news-detail-body blockquote {
    border-left: 4px solid var(--neon-purple);
    padding-left: var(--space-lg);
    margin: var(--space-lg) 0;
    color: var(--text-secondary);
    font-style: italic;
}

.news-detail-body code {
    background: rgba(189, 0, 255, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: monospace;
    color: var(--neon-purple);
}

.news-detail-body pre {
    background: rgba(0, 0, 0, 0.5);
    padding: var(--space-md);
    border-radius: 8px;
    overflow-x: auto;
    margin: var(--space-md) 0;
}

/* Lead paragraph style */
.news-detail-body p.lead {
    font-size: 1.25rem;
    font-weight: 300;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

/* Comments Section */
.comments-section {
    margin-top: var(--space-2xl);
    padding-top: var(--space-2xl);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.comments-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-xl);
}

.comments-title {
    font-family: 'Orbitron', monospace;
    font-size: 1.5rem;
    font-weight: 700;
}

.comments-count {
    color: var(--text-secondary);
}

.comment-form {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: var(--space-lg);
    margin-bottom: var(--space-xl);
}

.comment-notice {
    text-align: center;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
}

.comment-textarea {
    width: 100%;
    min-height: 120px;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: var(--space-md);
    color: var(--text-primary);
    font-family: inherit;
    resize: vertical;
    margin-bottom: var(--space-md);
}

.comment-textarea:focus {
    outline: none;
    border-color: rgba(189, 0, 255, 0.5);
}

.comment-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.comment-as {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.comment-submit {
    background: var(--gradient-primary);
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-base);
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

.comment-submit:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(189, 0, 255, 0.4);
}

.comment-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Username Setup */
.username-setup {
    text-align: center;
    padding: var(--space-lg);
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
}

.username-setup p {
    margin-bottom: var(--space-md);
    color: var(--text-secondary);
}

.username-setup .username-input {
    display: block;
    width: 100%;
    max-width: 300px;
    margin: 0 auto var(--space-md);
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 12px 16px;
    color: var(--text-primary);
    font-size: 1rem;
    text-align: center;
}

.username-setup .username-input:focus {
    outline: none;
    border-color: rgba(189, 0, 255, 0.5);
    box-shadow: 0 0 20px rgba(189, 0, 255, 0.2);
}

.username-setup .btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    padding: 12px 24px;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-base);
}

.username-setup .btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(189, 0, 255, 0.4);
}

.username-setup .btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.comments-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.comment-item {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: var(--space-lg);
    transition: all var(--transition-base);
}

.comment-item:hover {
    border-color: rgba(255, 255, 255, 0.1);
}

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-sm);
}

.comment-author {
    font-weight: 600;
    color: var(--neon-purple);
}

.comment-date {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.comment-content {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Create/Edit News Modal */
.news-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-lg);
    overflow-y: auto;
}

.news-modal-content {
    background: var(--bg-dark);
    border: 2px solid rgba(189, 0, 255, 0.3);
    border-radius: 24px;
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.news-modal-header {
    padding: var(--space-xl);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.news-modal-title {
    font-family: 'Orbitron', monospace;
    font-size: 1.75rem;
    font-weight: 700;
}

.news-modal-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 8px;
    transition: all var(--transition-base);
}

.news-modal-close:hover {
    color: var(--text-primary);
    transform: rotate(90deg);
}

.news-modal-body {
    padding: var(--space-xl);
    max-height: calc(90vh - 100px);
    overflow-y: auto;
}

.news-form {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.form-group label {
    display: block;
    margin-bottom: var(--space-sm);
    font-weight: 600;
    color: var(--text-primary);
}

.form-input,
.form-select {
    width: 100%;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 12px 16px;
    color: var(--text-primary);
    font-size: 1rem;
    transition: all var(--transition-base);
}

.form-input:focus,
.form-select:focus {
    outline: none;
    border-color: rgba(189, 0, 255, 0.5);
    box-shadow: 0 0 20px rgba(189, 0, 255, 0.2);
}

/* Image Upload Fix */
.image-upload {
    position: relative;
    min-height: 200px;
    max-height: 300px;
    background: rgba(0, 0, 0, 0.3);
    border: 2px dashed rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-base);
    overflow: hidden;
}

.image-upload:hover {
    border-color: rgba(189, 0, 255, 0.5);
    background: rgba(189, 0, 255, 0.05);
}

.image-upload-text {
    text-align: center;
    color: var(--text-secondary);
}

.image-preview {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
}

/* Fix Modal Scrolling */
.news-modal-content {
    max-height: 90vh;
    overflow-y: auto;
}

.news-modal-body {
    max-height: calc(90vh - 100px);
    overflow-y: auto;
}

/* Button Styles im Modal */
.form-actions {
    display: flex;
    gap: var(--space-md);
    justify-content: flex-end;
    padding-top: var(--space-lg);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: var(--space-lg);
}

.form-actions .btn {
    min-width: 120px;
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-base);
    border: none;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(189, 0, 255, 0.4);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Quill Editor Styling */
.ql-container {
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 0 0 12px 12px;
    min-height: 300px;
    font-family: 'Inter', sans-serif !important;
}

.ql-toolbar {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 12px 12px 0 0;
}

.ql-snow .ql-stroke {
    stroke: var(--text-secondary);
}

.ql-snow .ql-fill {
    fill: var(--text-secondary);
}

.ql-snow .ql-picker {
    color: var(--text-secondary);
}

.ql-snow .ql-picker-options {
    background: var(--bg-dark);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.ql-snow .ql-picker-label:hover,
.ql-snow .ql-picker-label.ql-active,
.ql-snow .ql-picker-item:hover,
.ql-snow .ql-picker-item.ql-selected {
    color: var(--neon-purple);
}

.ql-editor {
    color: var(--text-primary);
    font-size: 1rem;
    line-height: 1.8;
    padding: var(--space-lg);
}

.ql-editor h1 { 
    font-size: 2.5rem; 
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.ql-editor h2 { 
    font-size: 2rem; 
    margin-bottom: 0.8rem;
    color: var(--text-primary);
}

.ql-editor h3 { 
    font-size: 1.5rem; 
    margin-bottom: 0.6rem;
    color: var(--text-primary);
}

.ql-editor h4 { 
    font-size: 1.25rem; 
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.ql-editor p {
    margin-bottom: 1rem;
}

.ql-editor blockquote {
    border-left: 4px solid var(--neon-purple);
    padding-left: 1rem;
    margin: 1rem 0;
    color: var(--text-secondary);
}

.ql-editor pre {
    background: rgba(0, 0, 0, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 1rem;
    overflow-x: auto;
}

.ql-editor img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1rem 0;
}

/* Custom Editor Toolbar */
.editor-toolbar-custom {
    display: flex;
    gap: var(--space-sm);
    margin-bottom: -1px;
    background: rgba(0, 0, 0, 0.3);
    padding: var(--space-sm);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px 12px 0 0;
    border-bottom: none;
}

.editor-btn {
    background: rgba(189, 0, 255, 0.1);
    border: 1px solid rgba(189, 0, 255, 0.3);
    color: var(--neon-purple);
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    transition: all var(--transition-base);
    font-size: 0.875rem;
    font-weight: 500;
}

.editor-btn:hover {
    background: rgba(189, 0, 255, 0.2);
    transform: translateY(-1px);
}

/* Preview Modal */
.preview-modal .news-detail-preview {
    background: rgba(17, 17, 17, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: var(--space-xl);
}

.preview-modal .news-detail-body {
    max-height: 500px;
    overflow-y: auto;
}

/* Responsive */
@media (max-width: 768px) {
    .devblog-header {
        flex-direction: column;
        gap: var(--space-md);
        text-align: center;
    }
    
    .devblog-title {
        font-size: 2rem;
    }
    
    .news-grid {
        grid-template-columns: 1fr;
    }
    
    .news-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .news-filters {
        width: 100%;
        justify-content: center;
    }
    
    .create-news-btn {
        width: 100%;
        justify-content: center;
    }
    
    .news-detail-title {
        font-size: 1.75rem;
    }
    
    .news-modal-content {
        margin: var(--space-sm);
        max-height: calc(100vh - 2rem);
    }
}