/* --- CUTE THEME VARIABLES --- */
:root {
    --primary-pink: #ffcdd2;
    --dark-pink: #ef9a9a;
    --hover-pink: #e57373;
    --bg-color: #68cc7e;
    --bg-light: #defacc;
    --text-color: #5d4037;
    --white: #ffffff;
    --card-shadow: 0 8px 20px rgba(239, 154, 154, 0.2);
}

/* --- RESET & BASIC STYLES --- */
* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Quicksand', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    padding-bottom: 100px; /* Space for sticky footer */
}

h1, h2, h3 {
    font-family: 'Fredoka One', cursive;
    color: var(--text-color);
    margin-bottom: 15px;
}

/* --- HEADER --- */
header {
    background-color: var(--white);
    padding: 15px 20px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.logo {
    font-size: 1.8rem;
    color: var(--dark-pink);
    display: block;
    margin-bottom: 10px;
    font-family: 'Fredoka One', cursive;
}

/* --- NAVIGATION BUTTONS --- */
nav {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

nav button {
    background: transparent;
    border: 2px solid var(--primary-pink);
    border-radius: 25px;
    padding: 8px 20px;
    color: var(--text-color);
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Quicksand', sans-serif;
    font-size: 0.95rem;
}

nav button:hover, nav button.active {
    background-color: var(--primary-pink);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(255, 205, 210, 0.5);
}

/* --- MAIN CONTAINER --- */
main {
    max-width: 1100px;
    margin: 30px auto;
    padding: 0 20px;
    min-height: 60vh;
}

/* Page Visibility Logic */
.page-section {
    display: none; /* Hidden by default */
    animation: fadeIn 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
.page-section.active {
    display: block; /* Show if active */
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- GRID LAYOUTS --- */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 25px;
}

/* --- PHOTO CARDS --- */
.photo-card {
    background: var(--white);
    padding: 12px;
    border-radius: 20px;
    box-shadow: var(--card-shadow);
    transition: transform 0.3s ease;
}

.photo-card:hover {
    transform: scale(1.02);
}

.photo-card img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 15px;
}

.caption {
    text-align: center;
    margin-top: 10px;
    font-weight: 600;
    color: var(--dark-pink);
}

/* --- CAT SELECTOR (DIRECTORY) --- */
.cat-directory {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 30px;
    text-align: center;
}

.cat-avatar-card {
    background: var(--white);
    padding: 20px;
    border-radius: 25px;
    box-shadow: var(--card-shadow);
    cursor: pointer;
    transition: all 0.3s ease;
    border: 3px solid transparent;
}

.cat-avatar-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-pink);
}

.cat-avatar-card img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--primary-pink);
    margin-bottom: 15px;
}

/* --- INDIVIDUAL PROFILE STYLES --- */
.profile-header {
    background: var(--white);
    border-radius: 30px;
    padding: 40px;
    text-align: center;
    box-shadow: var(--card-shadow);
    margin-bottom: 30px;
    position: relative;
}

.back-btn {
    position: absolute;
    top: 20px;
    left: 20px;
    background: #eee;
    border: none;
    padding: 8px 15px;
    border-radius: 15px;
    cursor: pointer;
    font-weight: bold;
    color: #666;
}
.back-btn:hover { background: #ddd; }

.profile-large-img {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    object-fit: cover;
    border: 6px solid var(--primary-pink);
    margin-bottom: 20px;
}

.stats {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 15px;
}

.stat-tag {
    background: var(--primary-pink);
    color: var(--text-color);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: bold;
}

/* --- ABOUT SECTION --- */
.about-box {
    background: var(--white);
    padding: 50px;
    border-radius: 30px;
    text-align: center;
    box-shadow: var(--card-shadow);
    max-width: 800px;
    margin: 0 auto;
}

/* --- DONATION FOOTER --- */
footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: var(--white);
    border-top: 5px solid var(--primary-pink);
    padding: 15px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    box-shadow: 0 -5px 20px rgba(0,0,0,0.05);
    z-index: 2000;
}

.donate-btn {
    background-color: var(--dark-pink);
    color: white;
    border: none;
    padding: 12px 35px;
    border-radius: 50px;
    font-size: 1.1rem;
    font-family: 'Fredoka One', cursive;
    cursor: pointer;
    box-shadow: 0 4px 0 var(--hover-pink);
    transition: transform 0.1s;
}

.donate-btn:active {
    box-shadow: 0 2px 0 var(--hover-pink);
    transform: translateY(2px);
}

/* --- LIGHTBOX STYLES --- */
.lightbox {
    display: none; /* Hidden by default */
    position: fixed;
    z-index: 3000; /* Above everything else */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9); /* Dark background */
    cursor: zoom-out;
    padding-top: 50px;
}

.lightbox-content {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 800px;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 10px;
    border: 5px solid var(--white);
    animation: zoomIn 0.3s ease;
}

#lightbox-caption {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 700px;
    text-align: center;
    color: white;
    padding: 15px 0;
    font-family: 'Fredoka One', cursive;
    font-size: 1.2rem;
}

.close-lightbox {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
}

/* Allow users to know images are clickable */
.photo-card img {
    cursor: zoom-in;
}

@keyframes zoomIn {
    from { transform: scale(0.7); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}