/* ============================================
   Articles & Admin — Premium Styles
   ============================================ */

/* === ARTICLE CARD === */
.article-card {
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 1.25rem;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.article-card:hover {
    border-color: rgba(0, 212, 255, 0.15);
    transform: translateY(-6px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35), 0 0 25px rgba(0, 212, 255, 0.05);
}

.article-card .article-img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.article-card:hover .article-img {
    transform: scale(1.05);
}

.article-card .article-img-wrapper {
    overflow: hidden;
    position: relative;
}

.article-card .article-img-wrapper::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: linear-gradient(to top, rgba(15, 23, 42, 0.8), transparent);
    pointer-events: none;
}

.article-card .article-body {
    padding: 1.5rem;
}

.article-card .article-tag {
    display: inline-flex;
    padding: 0.2rem 0.7rem;
    border-radius: 100px;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    background: rgba(0, 212, 255, 0.08);
    color: #00d4ff;
    border: 1px solid rgba(0, 212, 255, 0.15);
}

.article-card .article-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #f1f5f9;
    margin: 0.75rem 0 0.5rem;
    letter-spacing: -0.01em;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-card .article-excerpt {
    font-size: 0.875rem;
    color: #94a3b8;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 1rem;
}

.article-card .article-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    font-size: 0.75rem;
    color: #64748b;
}

.article-card .read-more {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: #00d4ff;
    font-weight: 600;
    font-size: 0.8125rem;
    transition: all 0.3s ease;
    text-decoration: none;
}

.article-card .read-more:hover {
    gap: 0.65rem;
}

/* === ARTICLE DETAIL MODAL === */
.article-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 100;
    background: rgba(5, 10, 15, 0.9);
    backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    overflow-y: auto;
}

.article-modal-overlay.active {
    display: flex;
}

.article-modal {
    background: #0f172a;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 1.5rem;
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: modalIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalIn {
    from { opacity: 0; transform: scale(0.95) translateY(12px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.article-modal .modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #e2e8f0;
    font-size: 1.125rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 2;
}

.article-modal .modal-close:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #00d4ff;
}

.article-modal .modal-img {
    width: 100%;
    height: 350px;
    object-fit: cover;
    border-radius: 1.5rem 1.5rem 0 0;
}

.article-modal .modal-body {
    padding: 2rem;
}

.article-modal .modal-body h2 {
    font-size: 1.75rem;
    font-weight: 800;
    color: #f1f5f9;
    margin-bottom: 0.75rem;
    letter-spacing: -0.02em;
}

.article-modal .modal-body .modal-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
    font-size: 0.8125rem;
    color: #64748b;
}

.article-modal .modal-body .modal-content {
    color: #cbd5e1;
    font-size: 1rem;
    line-height: 1.85;
    white-space: pre-wrap;
}

/* === ADMIN STYLES === */
.admin-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1.25rem;
}

.admin-form {
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 1.25rem;
    padding: 2rem;
}

.admin-form label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 0.5rem;
}

.admin-form input,
.admin-form textarea,
.admin-form select {
    width: 100%;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #f1f5f9;
    border-radius: 10px;
    padding: 0.75rem 1rem;
    font-size: 0.9375rem;
    font-family: 'Inter', system-ui, sans-serif;
    transition: all 0.3s ease;
}

.admin-form input::placeholder,
.admin-form textarea::placeholder {
    color: #475569;
}

.admin-form input:focus,
.admin-form textarea:focus,
.admin-form select:focus {
    outline: none;
    border-color: rgba(0, 212, 255, 0.4);
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.08);
    background: rgba(15, 23, 42, 0.8);
}

.admin-form .img-preview {
    width: 100%;
    max-height: 250px;
    object-fit: cover;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    margin-top: 0.5rem;
    display: none;
}

.admin-form .img-preview.visible {
    display: block;
}

/* Admin article list */
.admin-article-item {
    display: flex;
    gap: 1rem;
    align-items: center;
    background: rgba(15, 23, 42, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 1rem;
    padding: 1rem;
    transition: all 0.3s ease;
}

.admin-article-item:hover {
    border-color: rgba(0, 212, 255, 0.12);
}

.admin-article-item img {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
}

.admin-article-item .article-info {
    flex: 1;
    min-width: 0;
}

.admin-article-item .article-info h4 {
    font-size: 0.9375rem;
    font-weight: 600;
    color: #f1f5f9;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.admin-article-item .article-info p {
    font-size: 0.75rem;
    color: #64748b;
    margin-top: 0.15rem;
}

.admin-article-item .article-actions {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

.admin-article-item .article-actions button {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
    color: #94a3b8;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 0.8125rem;
}

.admin-article-item .article-actions .btn-edit:hover {
    background: rgba(0, 212, 255, 0.1);
    border-color: rgba(0, 212, 255, 0.3);
    color: #00d4ff;
}

.admin-article-item .article-actions .btn-delete:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.3);
    color: #ef4444;
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: #64748b;
}

.empty-state i {
    font-size: 3rem;
    color: #334155;
    margin-bottom: 1rem;
}

.empty-state h3 {
    color: #94a3b8;
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.empty-state p {
    font-size: 0.9375rem;
}

/* Toast notification */
.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 200;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    font-size: 0.875rem;
    font-weight: 600;
    color: white;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    transform: translateY(120%);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.toast.active {
    transform: translateY(0);
    opacity: 1;
}

.toast.success {
    background: #059669;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.toast.error {
    background: #dc2626;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

/* Tabs */
.admin-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.admin-tab {
    padding: 0.625rem 1.25rem;
    border-radius: 10px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(15, 23, 42, 0.3);
    color: #94a3b8;
}

.admin-tab:hover {
    background: rgba(15, 23, 42, 0.6);
    color: #e2e8f0;
}

.admin-tab.active {
    background: #00d4ff;
    color: #050a0f;
    border-color: #00d4ff;
}

/* Filter select */
.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
    margin-bottom: 2rem;
}

.filter-bar .search-input {
    flex: 1;
    min-width: 200px;
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.06);
    color: #f1f5f9;
    border-radius: 10px;
    padding: 0.625rem 1rem 0.625rem 2.5rem;
    font-size: 0.875rem;
    font-family: 'Inter', system-ui, sans-serif;
    transition: all 0.3s ease;
}

.filter-bar .search-input:focus {
    outline: none;
    border-color: rgba(0, 212, 255, 0.3);
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.06);
}

.filter-bar .search-wrapper {
    position: relative;
    flex: 1;
    min-width: 200px;
}

.filter-bar .search-wrapper i {
    position: absolute;
    left: 0.85rem;
    top: 50%;
    transform: translateY(-50%);
    color: #475569;
    font-size: 0.8125rem;
    pointer-events: none;
}

@media (max-width: 768px) {
    .article-card .article-img {
        height: 180px;
    }

    .article-modal .modal-img {
        height: 220px;
    }

    .article-modal .modal-body {
        padding: 1.25rem;
    }

    .article-modal .modal-body h2 {
        font-size: 1.375rem;
    }

    .admin-article-item {
        flex-direction: column;
        text-align: center;
    }

    .admin-article-item img {
        width: 100%;
        height: 120px;
    }

    .admin-article-item .article-actions {
        justify-content: center;
    }
}
