html {
    background: #181818 !important;
}

body {
    background: linear-gradient(135deg, #1a1a1a, #2a2a2a);
    color: white;
    overflow-x: hidden;
}

/* --- Always use dark navbar for /db subsite --- */
.navbar {
    background: rgba(184, 115, 51, 0.92) !important; /* copper */
    color: #fff !important;
    backdrop-filter: blur(10px);
    transition: background-color 0.3s ease;
}

.navbar .nav-link,
.navbar .navbar-brand {
    color: #fff !important;
    text-shadow: 0 1px 2px #000;
    transition: color 0.3s ease, text-shadow 0.3s ease;
}

.navbar .nav-link:hover,
.navbar .nav-link:focus {
    color: #ffd699 !important; /* light copper/gold */
}

.navbar .nav-link.active {
    color: white !important;
    background: rgba(184, 115, 51, 0.18);
    border-radius: 6px;
    font-weight: bold;
}

/* Remove white box around Home on small screens */
.navbar-brand,
.navbar-brand:focus,
.navbar-brand:active {
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
}

.navbar-toggler {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

/* --- Unused: Light navbar option (for future use) --- */
.navbar.light {
    background: rgba(250, 240, 230, 0.95) !important;
    color: #222 !important;
}
.navbar.light .nav-link,
.navbar.light .navbar-brand {
    color: #b87333 !important;
    text-shadow: none;
}
.navbar.light .nav-link:hover,
.navbar.light .nav-link:focus {
    color: #a0522d !important;
}

/* DB Page Header */
.db-page-header {
    max-width: 900px;
    margin: 80px auto 32px auto;
    text-align: center;
}
.db-page-header h1 {
    font-size: 2.2rem;
    margin-top: 10px;
    padding-top: 10px;
    margin-bottom: 0.5rem;
    color: #ffd699; /* light copper/gold */
}
.db-page-header .lead {
    font-size: 1.2rem;
    color: #ffd699;
}

/* Card Grid */
#card-view {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 100px;
    gap: 20px;
}

.card-container {
    perspective: 1000px;
}

.card-container a {
    text-decoration: none;
}

.card-flip {
    width: 220px;
    height: 140px;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.8s, box-shadow 0.3s;
    cursor: pointer;
    display: block;
}

.card-container:hover .card-flip {
    transform: rotateY(180deg) scale(1.05);
    box-shadow: 0 0 20px 4px #ffb266cc, 0 0 8px 2px #fff0e0cc; /* copper glow */
}

.card-front,
.card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 15px;
    color: #ffd699;
    font-weight: bold;
    backface-visibility: hidden;
    background: rgba(184, 115, 51, 0.18); /* copper */
    border: 1px solid #b87333;
}

.card-back {
    transform: rotateY(180deg);
    font-weight: normal;
    font-size: 11pt;
    background: rgba(184, 115, 51, 0.28); /* copper */
}

/* Slide-in Pages */
.page-slide {
    position: fixed;
    top: 60px;
    width: 100%;
    height: calc(100% - 60px);
    background: linear-gradient(135deg, #1a1a1a, #2a2a2a);
    backdrop-filter: blur(10px);
    transform: translateX(100%);
    z-index: 100;
    padding-top: 20px;
    padding-left: 30px;
}

.page-slide h2 {
    color: #ffb266;
}

.page-slide h3 {
    color: #e6a96b;
    font-size: 0.9em;
}

/* Make hyperlinks lighter and higher contrast on dark backgrounds */
.page-slide a,
.page-slide a:visited {
    color: #ffb266;
    text-decoration: underline;
    font-weight: 500;
    transition: color 0.2s;
}

.page-slide a:hover,
.page-slide a:focus {
    color: #fff0e0;
    text-decoration: underline;
}

/* Arrows */
.arrow-left,
.arrow-right {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    font-size: 2.2em;
    color: #ffb266;
    opacity: 0.95;
    cursor: pointer;
    z-index: 999;
    user-select: none;
    background: none;
    border: none;
    box-shadow: none;
    padding: 0;
    transition: color 0.2s, opacity 0.2s, transform 0.2s;
}

.arrow-left {
    left: 20px;
}

.arrow-right {
    right: 20px;
}

.arrow-left:hover,
.arrow-right:hover {
    opacity: 1;
    color: #ffd699;
    transform: translateY(-50%) scale(1.08);
}

/* Footer */
footer {
    position: fixed;
    bottom: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.4);
    text-align: center;
    padding: 5px 0;
    font-size: 0.9em;
}