/* Modern CSS for PRNG site - Card-based design with hover effects */

html,
body {
    height: 100%;
    width: 100%;
    overflow-x: hidden;
    font-family: "Inter", sans-serif;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    line-height: 1.6;
}

/* Enhanced card styles with hover effects */
.content-card {
    background: #ffffff;
    border-radius: 16px;
    box-shadow:
        0 4px 6px -1px rgba(0, 0, 0, 0.1),
        0 2px 4px -1px rgba(0, 0, 0, 0.06);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(229, 231, 235, 0.8);
    margin-bottom: 2.5rem;
    overflow: hidden;
    position: relative;
}

.content-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(59, 130, 246, 0.5),
        transparent
    );
    opacity: 0;
    transition: opacity 0.4s ease;
}

.content-card:hover {
    transform: translateY(-8px);
    box-shadow:
        0 20px 25px -5px rgba(0, 0, 0, 0.15),
        0 10px 10px -5px rgba(0, 0, 0, 0.1);
    border-color: rgba(59, 130, 246, 0.3);
}

.content-card:hover::before {
    opacity: 1;
}

/* Card header variants with beautiful gradients */
.card-header-intro {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 50%, #bfdbfe 100%);
    border-bottom: 1px solid rgba(147, 197, 253, 0.3);
}

.card-header-64bit {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 50%, #bbf7d0 100%);
    border-bottom: 1px solid rgba(134, 239, 172, 0.3);
}

.card-header-32bit {
    background: linear-gradient(135deg, #fefbef 0%, #fef3c7 50%, #fde68a 100%);
    border-bottom: 1px solid rgba(251, 191, 36, 0.3);
}

.card-header-16bit {
    background: linear-gradient(135deg, #fdf4ff 0%, #f3e8ff 50%, #ddd6fe 100%);
    border-bottom: 1px solid rgba(196, 181, 253, 0.3);
}

.card-header-congruential {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 50%, #fecaca 100%);
    border-bottom: 1px solid rgba(252, 165, 165, 0.3);
}

.card-header-adoption {
    background: linear-gradient(135deg, #f0fdfa 0%, #ccfbf1 50%, #99f6e4 100%);
    border-bottom: 1px solid rgba(94, 234, 212, 0.3);
}

.card-header-shootout {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 50%, #e2e8f0 100%);
    border-bottom: 1px solid rgba(148, 163, 184, 0.3);
}

.card-header-testing {
    background: linear-gradient(135deg, #fff7ed 0%, #fed7aa 50%, #fdba74 100%);
    border-bottom: 1px solid rgba(251, 146, 60, 0.3);
}

.card-header {
    padding: 2rem 2.5rem 1.5rem;
    margin: 0;
    position: relative;
}

.card-body {
    padding: 2.5rem;
    position: relative;
}

.card-title {
    font-size: 1.875rem;
    font-weight: 700;
    color: #1f2937;
    font-family: "Inter", sans-serif;
}

/* Enhanced sidebar cards */
.sidebar-card {
    background: #ffffff;
    border-radius: 12px;
    box-shadow:
        0 2px 8px rgba(0, 0, 0, 0.08),
        0 1px 3px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(229, 231, 235, 0.6);
    margin-bottom: 1.5rem;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.sidebar-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(99, 102, 241, 0.4),
        transparent
    );
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sidebar-card:hover {
    transform: translateY(-2px);
    box-shadow:
        0 8px 25px rgba(0, 0, 0, 0.12),
        0 4px 10px rgba(0, 0, 0, 0.08);
    border-color: rgba(99, 102, 241, 0.3);
}

.sidebar-card:hover::before {
    opacity: 1;
}

.sidebar-card-header {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
}

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

.sidebar-card h5 {
    font-size: 1.125rem;
    font-weight: 600;
    margin: 0;
    color: #374151;
}

/* Enhanced table styling within cards */
.table-card {
    background: #ffffff;
    border-radius: 12px;
    box-shadow:
        0 4px 6px -1px rgba(0, 0, 0, 0.1),
        0 2px 4px -1px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(229, 231, 235, 0.8);
    margin: 2rem 0;
    overflow: hidden;
    transition: all 0.3s ease;
}

.table-card:hover {
    box-shadow:
        0 10px 15px -3px rgba(0, 0, 0, 0.1),
        0 4px 6px -2px rgba(0, 0, 0, 0.05);
    transform: translateY(-1px);
}

/* Enhanced navigation */
.navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(229, 231, 235, 0.8);
    transition: all 0.3s ease;
}

.navbar-brand {
    font-weight: 600;
    color: #1f2937;
    font-size: 1.25rem;
}

.navbar-brand:hover {
    color: #3b82f6;
}

.navbar-nav .nav-link {
    color: #6b7280;
    font-weight: 500;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    margin: 0 0.25rem;
    transition: all 0.3s ease;
}

.navbar-nav .nav-link:hover {
    color: #3b82f6;
    background-color: rgba(59, 130, 246, 0.1);
}

.navbar-nav .nav-link.active {
    background: linear-gradient(135deg, #3b82f6 0%, #6366f1 100%);
    color: #ffffff;
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.3);
}

/* Typography improvements - clean headings like vigna.di.unimi.it */
.card-body h1,
.card-body h2,
.card-body h3,
.card-body h4,
.card-body h5,
.card-body h6 {
    background: none;
    border: none;
    padding: 0;
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: #1f2937;
    font-weight: 600;
}

.card-body h1:first-child,
.card-body h2:first-child,
.card-body h3:first-child {
    margin-top: 0;
}

.card-body h2 {
    font-size: 1.5rem;
    color: #374151;
    font-weight: 600;
}

.card-body h3 {
    font-size: 1.25rem;
    color: #4b5563;
    font-weight: 600;
}

/* Enhanced paragraph styling */
.card-body p {
    margin-bottom: 1.5rem;
    line-height: 1.7;
    color: #4b5563;
}

/* Links */
a {
    color: #3b82f6;
    text-decoration: none;
    transition: all 0.2s ease;
    position: relative;
}

a:hover {
    color: #2563eb;
}

a:not(.nav-link):not(.navbar-brand):not(.btn)::after {
    content: "";
    position: absolute;
    width: 0;
    height: 1px;
    bottom: -2px;
    left: 0;
    background-color: #3b82f6;
    transition: width 0.3s ease;
}

a:not(.nav-link):not(.navbar-brand):not(.btn):hover::after {
    width: 100%;
}

samp,
code {
    color: black;
    font-family: Hack, monospace;
    font-size: 95%;
}

pre {
    background-color: #f0f0f0;
    border-radius: 0.25rem;
    padding: 1rem;
    overflow-x: auto;
}

/* Table improvements */
table.table {
    margin-bottom: 0;
}

table.table thead th {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    color: #374151;
    border-bottom: 2px solid #e5e7eb;
    font-weight: 600;
    padding: 1rem;
    position: sticky;
    top: 0;
}

table.table tbody td {
    padding: 0.875rem 1rem;
    border-bottom: 1px solid #f3f4f6;
    transition: background-color 0.2s ease;
}

table.table tbody tr:hover td {
    background-color: rgba(59, 130, 246, 0.05);
}

/* List styling in sidebar */
.sidebar-card ul {
    margin: 0;
}

.sidebar-card li {
    margin-bottom: 0.5rem;
    padding-left: 0.5rem;
    position: relative;
}

.sidebar-card li::before {
    content: "→";
    position: absolute;
    left: -0.25rem;
    color: #9ca3af;
    font-weight: bold;
    transition: color 0.2s ease;
}

.sidebar-card li:hover::before {
    color: #3b82f6;
}

.sidebar-card a {
    color: #6b7280;
    font-weight: 500;
    transition: color 0.2s ease;
}

.sidebar-card a:hover {
    color: #3b82f6;
}

/* Footer styling */
footer {
    background: #ffffff;
    border-top: 1px solid rgba(229, 231, 235, 0.8);
}

div[id][class*="content-card"] {
    scroll-margin-top: 80px;
}

@media (max-width: 991.98px) {
    /* This media query targets screens smaller than Bootstrap's 'lg' breakpoint */
    div[id][class*="content-card"] {
        scroll-margin-top: 470px;
    }
}

/* Responsive design */
@media (max-width: 768px) {
    .content-card {
        margin-bottom: 1.5rem;
        border-radius: 12px;
    }

    .card-header {
        padding: 1.5rem 1.5rem 1rem;
    }

    .card-body {
        padding: 1.5rem;
    }

    .card-title {
        font-size: 1.5rem;
    }

    .sidebar-card-body {
        padding: 1rem;
    }
}

/* Animation for cards on page load */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.content-card {
    animation: fadeInUp 0.6s ease-out;
}

.content-card:nth-child(1) {
    animation-delay: 0.1s;
}
.content-card:nth-child(2) {
    animation-delay: 0.2s;
}
.content-card:nth-child(3) {
    animation-delay: 0.3s;
}
.content-card:nth-child(4) {
    animation-delay: 0.4s;
}
.content-card:nth-child(5) {
    animation-delay: 0.5s;
}
.content-card:nth-child(6) {
    animation-delay: 0.6s;
}

div.dt-layout-cell {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}
