/* Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Color scheme */
:root {
  --background: #0f172a;
  --background-light: #1e293b;
  --text-light: #f1f5f9;
  --text-muted: #cbd5e1;
}

/* Body */
body {
  font-family: system-ui, sans-serif;
  background: var(--background);
  color: var(--text-light);
  overflow-x: hidden;
}

/* HERO SECTION */
.hero {
  position: relative;
  height: 100vh;
  width: 100%;
  flex: 1;
  background: var(--hero-image) center/cover no-repeat;

  display: flex;
  flex-direction: column;
  align-items: center;      /* center horizontally */
  justify-content: center;  /* center vertically */
  text-align: center;
}

body.admin-bg {
    background-color: #0f172a !important; /* same dark base as index.php */
    background:
        linear-gradient(to bottom, rgba(212,175,55,0.35), rgba(59,130,246,0.35)),
        rgba(255,255,255,0.12);
    background-repeat: no-repeat;
    background-attachment: fixed;
    
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(15, 23, 42, 0.3),
    rgba(15, 23, 42, 0.6),
    rgba(15, 23, 42, 1)
  );
}

.hero-content {
  position: relative;
  text-align: center;
  padding: 2rem;
  max-width: 800px;
}

.hero-content h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.hero-content p {
  font-size: 1.25rem;
  color: var(--text-muted);
}

/* Cards */
.cards {
  display: flex;
  gap: 2rem;
  padding: 3rem;
  justify-content: center;
}

.card {
  background: var(--background-light);
  padding: 1rem;
  border-radius: 12px;
  width: 280px;
  text-align: center;
}
/* Inputs */
.input-field {
  width: 100%;
  padding: 0.75rem;
  margin: 0.5rem 0 1rem;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.3);
  background: rgba(255,255,255,0.15);
  color: #fff;
  font-size: 1rem;
}

/* Gold button */
.gold-btn {
  background: linear-gradient(135deg, #d4af37, #b8860b);
  color: #fff;
  padding: 0.5rem 0.9rem;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  transition: 0.2s ease;
}

.gold-btn:hover {
  background: linear-gradient(135deg, #e6c14a, #c99710);
}

/* Glass modal */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal.show {
  display: flex;
}

.modal-content.glass {
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.2);
    padding: 2rem;
    border-radius: 16px;

    width: auto;
    min-width: 350px;
    max-width: 90vw;

    max-height: 90vh;
    overflow: hidden; /* prevents modal from scrolling */
}

/* Title + URL inputs inside modal */
#shareModal input[type="text"],
#shareModal input[type="url"] {
    width: 250px;
    max-width: 100%;
    display: block;
    margin: 0.5rem 0;
    padding: 0.6rem 0.9rem;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.25);
    background: rgba(255,255,255,0.15);
    color: white;
    font-size: 1rem;
}

.share-card h3 {
    margin-top: 0;
}
.share-description {
    font-size: 0.85rem;
    opacity: 0.85;
    margin: 0.5rem 0 0.75rem;
    line-height: 1.3;
}

.share-owner {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.55); /* lighter, softer */
    margin-top: 0.25rem;
    margin-bottom: 0.75rem;
    font-style: italic;
    letter-spacing: 0.3px;
}


.share-actions {
    margin-top: 0.75rem;
    display: flex;
    gap: 0.5rem;
}

.close-btn {
  margin-top: 1rem;
  background: #444;
  color: #fff;
}
.hero-cards {
  margin-top: 2rem;
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  flex-wrap: wrap;
}

.hero .card {
  background: rgba(255,255,255,0.12);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.2);
  padding: 1.5rem;
  border-radius: 12px;
  width: 260px;
  text-align: center;
  color: var(--text-light);
}
/* Fade-up animation */
@keyframes fadeUp {
  0% {
    opacity: 0;
    transform: translateY(25px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Apply animation to hero cards */
.hero-cards .card {
  opacity: 0;
  animation: fadeUp 0.8s ease-out forwards;
}

/* Staggered animation delays */
.hero-cards .card:nth-child(1) {
  animation-delay: 0.2s;
}

.hero-cards .card:nth-child(2) {
  animation-delay: 0.4s;
}

.hero-cards .card:nth-child(3) {
  animation-delay: 0.6s;
}
.hero-inner {
    padding: 2rem 3rem;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
}

.page-title {
    font-size: 2.2rem;
    margin-bottom: 1.5rem;
}

.admin-form {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 1rem;
    margin-top: 1rem;
}

.admin-form input {
    padding: 0.6rem 0.8rem;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.25);
    background: rgba(255,255,255,0.15);
    color: white;
}

.user-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.user-table th,
.user-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.15);
}

.inline {
    display: inline;
}


/* Left Sidebar (pushes content) */
.nav-drawer {
    all: unset;
    display: block;
    flex: 0 0 140px;
    width: 140px;
    min-height: 100vh;

background:
        linear-gradient(to bottom, rgba(212,175,55,0.35), rgba(59,130,246,0.35)),
        rgba(255,255,255,0.12);

    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);

    border-right: 1px solid rgba(255, 255, 255, 0.25);
    padding: 2rem 1.5rem;
    
    position: relative !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    z-index: 1 !important;
}

.nav-drawer.open {
    left: 0;
}

/* Header */
.nav-header h2 {
    color: #ffffff;
    font-size: 1.4rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.nav-header .close-btn {
    background: none;
    border: none;
    color: #ffffff;
    font-size: 1.8rem;
    cursor: pointer;
    opacity: 0.8;
    transition: 0.2s;
}

.nav-header .close-btn:hover {
    opacity: 1;
}

/* Links */
.nav-links {
    list-style: none;
    padding: 0;
    margin-top: 2rem;
}

.nav-links li {
    margin: 1.2rem 0;
}

.nav-links a {
    color: #ffffff;
    text-decoration: none;
    font-size: 1.15rem;
    font-weight: 500;
    letter-spacing: 0.3px;

    /* Gold hover */
    transition: color 0.25s ease, transform 0.2s ease;
}

.nav-links a:hover {
    color: #d4af37;
    transform: translateX(4px);
}

/* Logout link */
.nav-links .logout {
    color: #ff6b6b;
}

.nav-links .logout:hover {
    color: #ff8787;
}

.layout {
    display: flex;
    flex-direction: row;
    min-height: 100vh;
}


.close-btn {
    background: none;
    border: none;
    color: var(--text-light);
    font-size: 1.5rem;
    cursor: pointer;
}
.content-area {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* EXTENSION-PROOF NAV DRAWER ---ALWAYS AT BOTTOM */
[data-family-nav] {
    all: initial; /* wipe out ANY injected extension CSS */
    display: block;

    /*width: 160px; */
    min-height: 100vh;

background:
        linear-gradient(to bottom, rgba(212,175,55,0.35), rgba(59,130,246,0.35)),
        rgba(255,255,255,0.12);

    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);

    border-right: 1px solid rgba(255,255,255,0.25);
    padding: 2rem 1.5rem;

    position: relative;
    z-index: 1;

    /* restore your typography */
    font-family: system-ui, sans-serif;
    color: #fff;
}

/* restore child elements after all: initial */
[data-family-nav] * {
    all: unset;
    display: block;
    font-family: inherit;
    color: inherit;
}
.clickable {
    cursor: pointer;
    transition: transform 0.15s ease, background 0.2s ease;
}

.clickable:hover {
    transform: translateY(-3px);
    background: rgba(255,255,255,0.18);
}
.profile-card {
    margin-bottom: 1.5rem;
    padding: 1.5rem;
    border-radius: 14px;
    text-align: left;
}

.profile-card p {
    text-align: left;
    margin: 0.25rem 0;
}

.clickable {
    cursor: pointer;
    transition: transform 0.15s ease, background 0.2s ease;
}

.clickable:hover {
    transform: translateY(-3px);
    background: rgba(255,255,255,0.18);
}
.profile-card {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);

    border-radius: 18px;
    padding: 1.75rem;
    margin-bottom: 1.75rem;

    box-shadow: 0 8px 24px rgba(0,0,0,0.25);
    transition: transform 0.15s ease, background 0.2s ease;
}
.mailbox-warning {
    color: #ff6b6b;
    font-weight: 700;
}
.auth-email {
    color: #4da6ff;
    font-weight: 600;
}

.auth-database {
    color: #ffd700;
    font-weight: 600;
}


.profile-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.75rem;
    margin-top: 1.5rem;
}

@media (max-width: 1100px) {
    .profile-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 700px) {
    .profile-grid {
        grid-template-columns: 1fr;
    }
}
.gold-link {
    color: var(--gold);
    font-weight: 600;
    text-decoration: none;
}

.gold-link:hover {
    text-decoration: underline;
}

/* Card style matching login.php */
.profile-card {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);

    border-radius: 18px;
    padding: 1.75rem;
    box-shadow: 0 8px 24px rgba(0,0,0,0.25);

    transition: transform 0.15s ease, background 0.2s ease;
}

.profile-card h2 {
    margin-top: 0;
    margin-bottom: 0.75rem;
    font-size: 1.4rem;
    font-weight: 600;
}

.profile-card p {
    margin: 0.25rem 0;
    font-size: 1rem;
}

.profile-card.clickable {
    cursor: pointer;
}

.profile-card.clickable:hover {
    transform: translateY(-4px);
    background: rgba(255,255,255,0.18);
}

.profile-card.clickable {
    cursor: pointer;
}

.profile-card.clickable:hover {
    transform: translateY(-4px);
    background: rgba(255,255,255,0.18);
}

/* Universal glass card style (used across the portal) */
.glass-card {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);

    border-radius: 18px;
    padding: 1.75rem;
    box-shadow: 0 8px 24px rgba(0,0,0,0.25);

    transition: transform 0.15s ease, background 0.2s ease;
}

.glass-card:hover {
    transform: translateY(-4px);
    background: rgba(255,255,255,0.18);
}


/* Grid layout for cards (used on profile.php and shared_pictures.php) */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.25rem;
    width: 100%;
    align-items: start;
}


/* Optional: make cards consistent in height */
.card-grid .glass-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.card-grid .glass-card.share-card {
    width: 100%;
}

.share-card .btn {
    margin-top: 0.5rem;
}
.share-card {
    height: 100%;
}


/* Ensure cards inside the grid behave like profile.php cards */
.card-grid > .glass-card {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}


/* Group edit + delete buttons side by side */
.share-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

/* Red delete button matching your theme */
.delete-btn {
    background: linear-gradient(135deg, #b91c1c, #7f1d1d);
    color: #fff;
    border: none;
    padding: 0.5rem 0.9rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: 0.2s ease;
}

.delete-btn:hover {
    background: linear-gradient(135deg, #dc2626, #991b1b);
}
/* Orange edit button */
.edit-btn {
    background: linear-gradient(135deg, #f59e0b, #d97706); /* warm amber/orange */
    color: #fff;
    border: none;
    padding: 0.5rem 0.9rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: 0.2s ease;
}

.edit-btn:hover {
    background: linear-gradient(135deg, #fbbf24, #ea8c0f);
}

/* restore list + link behavior */
[data-family-nav] ul {
    list-style: none;
    padding: 0;
    margin: 2rem 0 0;
}

[data-family-nav] li {
    margin: 1.2rem 0;
}

[data-family-nav] a {
    text-decoration: none;
    font-size: 1.15rem;
    font-weight: 500;
    letter-spacing: 0.3px;
    cursor: pointer;
}

[data-family-nav] a:hover {
    color: #d4af37;
    transform: translateX(4px);
}
/* Collapsible card header */
.collapsible-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
}
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}
/* Green Add button */
.add-btn {
    background: linear-gradient(135deg, #22c55e, #16a34a); /* emerald → green */
    color: #fff;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: 0.2s ease;
}
/* Container for user selection */
.share-users-grid {
    margin-top: 0.75rem;
    text-align: left;
}


/* Dynamic 6-row × 4-column grid, filling rows first */
.users-grid {
    display: grid;
    grid-auto-flow: column; /* ← THIS makes it fill rows first */
    grid-template-rows: repeat(6, auto); /* 6 rows */
    grid-auto-columns: 1fr; /* columns grow as needed */
    max-height: calc(6 * 2rem); /* visible height for 6 rows */
    overflow-y: auto;
    gap: 0.4rem 1rem;
    padding-right: 0.5rem;
    text-align: left;
}


/* Checkbox styling */
.user-checkbox {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.9rem;
    white-space: nowrap;
}

.add-btn:hover {
    background: linear-gradient(135deg, #4ade80, #22c55e); /* lighter hover */
}

.collapse-arrow {
    font-size: 1.3rem;
    transition: transform 0.3s ease;
    opacity: 0.8;
}

.collapse-arrow.rotated {
    transform: rotate(-180deg);
}

/* Collapsible content wrapper */
.collapsible-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease, padding 0.3s ease;
    padding-top: 0;
}

.collapsible-content.open {
    max-height: 1000px; /* plenty of room */
    padding-top: 1rem;
}
