@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&display=swap');

/* root update for premium feel */
:root {
    --primary-color: #0f172a;
    --secondary-color: #3b82f6;
    --button-color: #3b82f6;
    --accent-color: #f59e0b;
    --gold: #c59d5f;
    --dark-blue: #0f172a;
    --bg-color: #f8fafc;
    --card-bg: #ffffff;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --glass-bg: rgba(255, 255, 255, 0.8);
    --glass-border: rgba(255, 255, 255, 0.3);
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
    --radius: 12px;
}

[data-theme="dark"] {
    --primary-color: #1e293b;
    --bg-color: #0f172a;
    --card-bg: #1e293b;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --glass-bg: rgba(30, 41, 59, 0.7);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

button,
.btn {
    cursor: pointer;
    border: none;
    outline: none;
    transition: all 0.3s ease;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header & Glassmorphism */
header {
    background: var(--primary-color);
    color: white;
    padding: 40px 0 80px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -10%;
    width: 120%;
    height: 200%;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.1) 0%, transparent 70%);
}

.header-content {
    position: relative;
    z-index: 10;
}

.logo-container {
    height: 120px;
    /* Fixed height to prevent pushing content */
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    position: relative;
}

.logo-container img {
    max-height: 250px;
    /* Maximum limit */
    width: auto;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.1));
    transition: height 0.3s ease;
    position: absolute;
    /* Image floats over content if it exceeds container */
    top: 50%;
    transform: translateY(-50%);
}

.header-title h1 {
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.header-title p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.1rem;
}

/* Search Area */
.search-wrapper {
    margin-top: -40px;
    z-index: 20;
    position: relative;
}

.search-card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    padding: 30px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.input-group {
    flex: 1;
    min-width: 200px;
}

.input-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-muted);
}

.input-group input,
.input-group select {
    width: 100%;
    padding: 12px 16px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    background: white;
    font-family: inherit;
    font-size: 1rem;
}

.btn-search {
    background: var(--button-color);
    color: white;
    padding: 0 30px;
    border-radius: 8px;
    font-weight: 600;
    height: 50px;
    display: flex;
    align-items: center;
    gap: 10px;
    align-self: flex-end;
}

.btn-search:hover {
    background: var(--button-hover-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

/* Main Content Grid */
.main-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
    margin-top: 50px;
    margin-bottom: 50px;
}

.card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 25px;
    box-shadow: var(--shadow-md);
    margin-bottom: 25px;
}

.card-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 15px;
}

/* Publication Card */
.pub-featured {
    text-align: center;
}

.pub-preview {
    background: #f1f5f9;
    border-radius: 8px;
    height: 400px;
    margin: 20px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.pub-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pub-preview iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* Premium Publication Card */
.pub-featured {
    padding: 0;
    overflow: hidden;
    border: none;
}

.pub-card-header {
    background: var(--button-color);
    color: white;
    padding: 30px;
    text-align: left;
}

.pub-card-header h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.pub-card-header .stats {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.pub-card-body {
    padding: 25px;
}

.pub-version-selector {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 20px;
}

.btn-version {
    background: var(--button-color);
    color: white;
    padding: 15px;
    border-radius: 8px;
    font-weight: 600;
    text-align: center;
    border: none;
}

.btn-version:hover {
    background: var(--button-hover-color);
    transform: translateY(-2px);
}

.pub-actions-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 20px;
}

.pub-actions-grid-three {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 12px;
    margin-bottom: 20px;
}

.btn-action-premium {
    background: #e2e8f0;
    color: var(--text-main);
    padding: 12px;
    border-radius: 8px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-action-premium:hover {
    background: #cbd5e1;
}

.btn-action-premium.primary {
    background: var(--button-color);
    color: white;
}

.btn-action-premium.primary:hover {
    background: var(--button-hover-color);
}

.btn-action-premium.success {
    background: #10b981;
    color: white;
}

.btn-action-premium.success:hover {
    background: #059669;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.pub-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.btn-outline {
    border: 1.5px solid var(--button-color);
    color: var(--button-color);
    background: transparent;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
}

.btn-outline:hover {
    background: var(--button-color);
    color: white;
}

/* Auth Verify Section */
.verify-card {
    background: linear-gradient(135deg, #ffffff 0%, #f1f5f9 100%);
}

.verify-input {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

/* Badges */
.badge {
    padding: 6px 14px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.badge-success {
    background: #ecfdf5;
    color: #059669;
}

.badge-warning {
    background: #fffbe6;
    color: #d97706;
}

.badge-danger {
    background: #fef2f2;
    color: #dc2626;
}

/* Micro-animations */
.hover-scale {
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.hover-scale:hover {
    transform: scale(1.02);
}

.hover-glow:hover {
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.15);
}

/* Enhanced Table */
table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

th {
    background: #f8fafc;
    padding: 16px;
    font-size: 0.75rem;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 2px solid #f1f5f9;
}

td {
    padding: 16px;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
}

tr:last-child td {
    border-bottom: none;
}

/* Admin Sidebar Brand */
.sidebar-brand .text-secondary {
    color: var(--secondary-color) !important;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.active-row {
    animation: fadeIn 0.4s ease-out forwards;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .main-grid {
        grid-template-columns: 1fr;
    }

    .header-title h1 {
        font-size: 1.8rem;
    }

    .search-card {
        flex-direction: column;
    }

    .btn-search {
        width: 100%;
        justify-content: center;
    }

    .pub-preview {
        height: 300px;
    }
}