/* ========== GLOBAL RESET & THEME ========== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Poppins", sans-serif;
}

body {
    background: #0d0d0d;
    color: #e0e0e0;
}

/* Links */

a {
    color: #bfa3ff;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Headings */

h1, h2, h3, h4 {
    color: #bfa3ff;
    font-weight: 600;
}

/* Generic containers */

.page-container {
    max-width: 1000px;
    margin: 40px auto;
    padding: 20px;
    background: #1a1a1a;
    border-radius: 10px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.4);
}

.section {
    width: 90%;
    max-width: 1000px;
    margin: 40px auto;
    background: #1a1a1a;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.4);
}

.section-title,
.page-title {
    font-size: 2rem;
    margin-bottom: 20px;
    text-align: center;
}

/* Cards */

.card,
.tree-card,
.download-card,
.contact-card,
.post,
.file-card,
.user-card {
    background: #2a1f3f;
    color: #e0e0e0;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.4);
    margin-bottom: 20px;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.card:hover,
.tree-card:hover,
.download-card:hover,
.contact-card:hover,
.post:hover,
.file-card:hover,
.user-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.6);
}

/* Buttons */

.btn,
button,
.create-button,
.download-card a,
.back-button,
.reply-button,
.account-box button {
    display: inline-block;
    padding: 10px 20px;
    background: #6a4bc3;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    transition: background 0.2s ease, transform 0.1s ease;
    text-decoration: none;
}

.btn:hover,
button:hover,
.create-button:hover,
.download-card a:hover,
.back-button:hover,
.reply-button:hover,
.account-box button:hover {
    background: #4a2e6f;
    transform: translateY(-1px);
}

/* Inputs & Forms */

input,
textarea,
select {
    width: 100%;
    background-color: #151515;
    border: 1px solid #444;
    border-radius: 6px;
    padding: 10px;
    font-size: 0.95rem;
    color: #e0e0e0;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: #bfa3ff;
}

label {
    font-size: 0.9rem;
    color: #cfcfcf;
}

/* ========== NAVBAR ========== */

.navbar {
    background: #4a2e6f;
    padding: 15px 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.5);
    width: 100%;
    z-index: 1000;
}

.nav-links {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.nav-links a {
    color: #ffffff;
    text-decoration: none;
    padding: 8px 14px;
    border-radius: 6px;
    background: #2e1f47;
    transition: background 0.2s ease;
    font-size: 0.9rem;
}

.nav-links a:hover {
    background: #1f1433;
}

/* Dark mode toggle (if used) */

.dark-toggle {
    margin-left: 20px;
    background: none;
    border: none;
    color: #ffffff;
    font-size: 1.3rem;
    cursor: pointer;
}

/* Logo (if used) */

.logo {
    position: absolute;
    top: 10px;
    left: 20px;
    z-index: 10;
}

.logo img {
    height: 70px;
    filter: brightness(1);
}

/* ========== HOMEPAGE ========== */

.landing-welcome {
    width: 85%;
    max-width: 900px;
    margin: 40px auto 20px;
    text-align: center;
}

.landing-welcome h1 {
    font-size: 2.8rem;
    color: #bfa3ff;
    margin-bottom: 10px;
}

.landing-welcome h3 {
    font-size: 1.3rem;
    font-weight: normal;
    margin-bottom: 20px;
    color: #d0c0ff;
}

.landing-welcome p {
    font-size: 1rem;
    line-height: 1.6;
    color: #dcdcdc;
}

.welcome {
    text-align: center;
    font-size: 1.5rem;
    margin-top: 20px;
}

.quote {
    text-align: center;
    font-size: 1.2rem;
    font-style: italic;
    color: #bfa3ff;
    margin-bottom: 30px;
}

/* ========== AUTH PAGES (LOGIN / REGISTER / RECOVER) ========== */

.container {
    background: #1a1a1a;
    width: 90%;
    max-width: 450px;
    padding: 1.5rem;
    margin: 80px auto 40px;
    border-radius: 10px;
    box-shadow: 0 20px 35px rgba(0,0,0,0.6);
}

.form-title {
    font-size: 1.7rem;
    font-weight: bold;
    text-align: center;
    padding: 1rem 0;
    color: #bfa3ff;
}

.input-group {
    position: relative;
    margin: 1.5rem 0;
}

.input-group i {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.1rem;
    color: #aaa;
}

.input-group input {
    padding-left: 40px;
}

.recover {
    text-align: right;
    margin-bottom: 1rem;
}

.recover a {
    color: #bfa3ff;
}

.links {
    display: flex;
    justify-content: space-between;
    margin-top: 1rem;
    font-weight: bold;
    font-size: 0.9rem;
}

/* ========== ACCOUNT PAGE ========== */

.profile-header {
    width: 80%;
    max-width: 700px;
    margin: 40px auto 20px;
    text-align: center;
}

.profile-header img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: #333;
    margin-bottom: 10px;
}

.profile-header h2 {
    margin-bottom: 5px;
}

.profile-header p {
    color: #c0c0c0;
    font-size: 0.95rem;
}

.account-box {
    width: 80%;
    max-width: 700px;
    margin: auto;
    background: #1a1a1a;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.5);
}

.account-box h2 {
    margin-bottom: 15px;
}

.account-box .message {
    text-align: center;
    color: #7ddc7d;
    margin-bottom: 20px;
}

.user-list {
    margin-top: 30px;
}

/* ========== CONTACT PAGE ========== */

.page-header {
    text-align: center;
    padding: 40px 20px 10px;
}

.page-header h1 {
    font-size: 2.2rem;
}

.page-header p {
    color: #d0d0d0;
}

.contact-grid {
    width: 85%;
    max-width: 1000px;
    margin: 40px auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 30px;
}

.contact-card .label {
    font-weight: bold;
    color: #bfa3ff;
}

/* ========== ABOUT / FAMILY TREE PAGE ========== */

.family-tree,
.lineage-tree {
    margin-top: 30px;
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.tree-level {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.tree-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 6px;
    background: #111;
    border: 1px solid #444;
}

.tree-connector {
    width: 4px;
    height: 40px;
    background: #bfa3ff;
    margin: 0 auto 30px;
    border-radius: 2px;
}

/* ========== BLOG PAGE ========== */

.feed {
    width: 80%;
    max-width: 700px;
    margin: 20px auto;
}

.post .author {
    font-weight: bold;
    color: #bfa3ff;
}

.post .timestamp {
    font-size: 0.85rem;
    color: #aaa;
    margin-bottom: 10px;
}

.post .content {
    font-size: 1rem;
    color: #e0e0e0;
    margin-bottom: 10px;
    white-space: pre-wrap;
}

.post img {
    max-width: 100%;
    border-radius: 8px;
    margin-top: 10px;
}

.actions {
    margin-top: 10px;
}

.like-button,
.comment-toggle,
.edit-link,
.delete-link {
    background: none;
    border: none;
    color: #bfa3ff;
    cursor: pointer;
    font-size: 0.9rem;
}

.comment-section {
    display: none;
    margin-top: 10px;
}

.comment {
    margin-left: 20px;
    margin-top: 10px;
    padding: 10px;
    background: #151515;
    border-radius: 6px;
}

.comment-time {
    color: #aaa;
    font-size: 0.85rem;
}

.comment-form textarea {
    height: 60px;
}

/* ========== DOWNLOADS PAGE ========== */

.download-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
    padding: 40px 20px;
}

/* ========== GALLERY / ARCHIVE PAGE ========== */

.search-container {
    text-align: center;
    margin: 30px 0;
}

.search-form {
    display: inline-block;
    width: 80%;
    max-width: 800px;
}

.search-input {
    width: 100%;
    padding: 14px;
    border-radius: 10px;
    border: 1px solid #555;
    font-size: 1rem;
    background: #151515;
    color: #e0e0e0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.5);
}

.breadcrumb {
    text-align: center;
    margin-top: 10px;
    color: #bfa3ff;
    font-size: 0.95rem;
}

.breadcrumb a {
    color: #d0c0ff;
    font-weight: bold;
}

.back-bar {
    text-align: center;
    margin: 15px 0 5px;
}

.grid {
    width: 85%;
    max-width: 1000px;
    margin: 30px auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
}

.file-card img {
    width: 100%;
    height: 220px;
    object-fit: contain;
    border-radius: 6px;
    background: #111;
    border: 1px solid #444;
}

.file-card h3 {
    margin-top: 12px;
    font-size: 1rem;
}

/* Viewer overlay */

#viewerOverlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.9);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

#viewerContent {
    position: relative;
    max-width: 90%;
    max-height: 90%;
}

#viewerImage {
    width: 90vw;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(0,0,0,0.7);
    background: #000;
}

#viewerClose {
    position: absolute;
    top: -30px;
    right: -30px;
    font-size: 2.5rem;
    color: white;
    cursor: pointer;
    font-weight: bold;
}

/* ========== USERS PAGE ========== */

.user-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
}

.user-card {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-avatar {
    width: 50px;
    height: 50px;
    background: #6a4bc3;
    color: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.4rem;
}

.user-info span {
    display: block;
    font-size: 0.9rem;
    color: #c0c0c0;
}

/* ========== RESPONSIVE ========== */

@media (max-width: 600px) {
    .navbar {
        flex-direction: column;
        gap: 10px;
    }

    .nav-links {
        justify-content: center;
        flex-wrap: wrap;
    }

    .page-container,
    .section {
        width: 90%;
        margin: 20px auto;
        padding: 15px;
    }

    .landing-welcome h1 {
        font-size: 2.1rem;
    }
}

.post-actions {
    margin-top: 10px;
    display: flex;
    gap: 15px;
}
.edit-link, .delete-link {
    color: #bfa3ff;
    font-size: 0.9rem;
    text-decoration: none;
}
.edit-link:hover, .delete-link:hover {
    text-decoration: underline;
}

.actions {
    margin-top: 10px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.action-button {
    background: #2e1f47;
    color: #bfa3ff;
    padding: 8px 14px;
    border-radius: 20px;
    border: 1px solid #4a2e6f;
    cursor: pointer;
    font-size: 0.9rem;
    text-decoration: none;
    display: inline-block;
    transition: background 0.2s ease, transform 0.1s ease;
}

.action-button:hover {
    background: #4a2e6f;
    transform: translateY(-1px);
}

.action-button.delete {
    color: #ff8a8a;
    border-color: #7a2e2e;
}

.action-button.delete:hover {
    background: #7a2e2e;
}
.lineage-tree {
    display: flex;
    flex-direction: column;
    gap: 40px;
    margin-top: 20px;
}

.tree-level {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 20px;
    justify-items: center;
}

.tree-card {
    background: #1f1b2e;
    border: 1px solid #3b3055;
    border-radius: 12px;
    padding: 12px;
    text-align: center;
    width: 100%;
    max-width: 180px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    transition: transform 0.2s ease;
}

.tree-card:hover {
    transform: translateY(-3px);
}

.tree-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 10px;
    border: 1px solid #4a3b6f;
}

.tree-card h3 {
    font-size: 1rem;
    margin: 0;
    color: #e0d6ff;
}

.tree-card p {
    font-size: 0.85rem;
    color: #c2b6e0;
    margin-top: 6px;
}
.user-status {
    display: block;
    margin-top: 4px;
    font-size: 0.85rem;
    color: #b8ffa8; /* light green for visibility */
}

.archive-stats {
    background: #1f1b2e;
    padding: 15px 20px;
    border-radius: 10px;
    border: 1px solid #3b3055;
    width: 220px;
    text-align: left;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.archive-stats h3 {
    color: #d9c6ff;
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.archive-stats p {
    color: #cfc3ff;
    margin: 4px 0;
    font-size: 0.9rem;
}

.archive-stats-floating {
    position: absolute;
    top: 110px;     /* move up/down */
    right: 40px;    /* move left/right */
    background: #1f1b2e;
    padding: 15px 20px;
    border-radius: 10px;
    border: 1px solid #3b3055;
    width: 220px;
    text-align: left;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    z-index: 50;
}

.archive-stats-floating h3 {
    color: #d9c6ff;
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.archive-stats-floating p {
    color: #cfc3ff;
    margin: 4px 0;
    font-size: 0.9rem;
}

.person-card {
    cursor: pointer;
}













/* OVERLAY */
#viewerOverlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.85);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

/* CONTENT WRAPPER */
#viewerContent {
    position: relative;
    text-align: center;
    width: 100%;
    max-width: 95vw;
    max-height: 95vh;
}

/* TOP BAR */
#viewerTopBar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    z-index: 1000;
    padding: 10px 0;
}

/* NAV BUTTONS (Prev/Next + PDF Prev/Next) */
.viewer-nav {
    background: rgba(255,255,255,0.15);
    border: none;
    color: white;
    padding: 8px 14px;
    font-size: 18px;
    cursor: pointer;
    border-radius: 6px;
}

/* CLOSE BUTTON */
#viewerClose {
    font-size: 32px;
    color: #ffffff;
    background: rgba(0,0,0,0.4);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    line-height: 40px;
    text-align: center;
    cursor: pointer;
    transition: background 0.2s ease;
}

#viewerClose:hover {
    background: rgba(255,255,255,0.2);
}

/* MEDIA ELEMENTS */
#viewerImage,
#viewerVideo,
#viewerPDF {
    max-width: 90vw;
    max-height: 80vh;
    border-radius: 10px;
    display: none;
    object-fit: contain;
}

/* ZOOM WRAPPER */
#viewerZoomWrapper {
    position: relative;
    overflow: hidden;
    max-width: 90vw;
    max-height: 80vh;
    margin: auto;
    cursor: grab;
}

#viewerZoomWrapper:active {
    cursor: grabbing;
}

/* ZOOMABLE MEDIA */
.zoomable {
    transform-origin: center center;
    transition: transform 0.15s ease-out;
}

/* VIDEO THUMBNAIL (GRID VIEW) */
.video-thumb {
    width: 100%;
    height: 180px;
    background: linear-gradient(135deg, #2a2438, #3b3055);
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    border: 1px solid #4a3b6f;
}

.video-thumb::before {
    content: "";
    width: 0;
    height: 0;
    border-left: 28px solid white;
    border-top: 18px solid transparent;
    border-bottom: 18px solid transparent;
    opacity: 0.85;
}

/* TITLE */
#viewerTitle {
    color: white;
    margin-top: 15px;
}
#viewerImage {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transform: none !important;
}























