/* RESET */
@import url('https://fonts.googleapis.com/css2?family=Permanent+Marker&family=Righteous&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: #0f0f0f; /* Dark background */
    color: #e0e0e0;
    font-family: 'Righteous', cursive; /* Flashy header font */
    overflow-x: hidden;
}

/* NAVBAR */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #333;
    position: sticky;
    top: 0;
    background: #0f0f0f;
    z-index: 100;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-wrapper {
    position: relative;
    width: 180px;
    height: 50px;
}

.logo-frame {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    animation: logoFlash 3s infinite;
}

.frame-0 { animation-delay: 0s; }
.frame-1 { animation-delay: 1s; }
.frame-2 { animation-delay: 2s; }

@keyframes logoFlash {
    0%, 30% { opacity: 1; transform: scale(1); }
    33%, 100% { opacity: 0; transform: scale(1.1); }
}

.menu-icon {
    width: 30px;
    cursor: pointer;
}

.bar {
    height: 2px;
    width: 100%;
    background-color: #fff;
    margin-bottom: 6px;
    transition: 0.3s;
}

/* GALLERY GRID */
.gallery-container {
    padding: 10px;
    max-width: 1200px;
    margin: 0 auto;
}

.gallery-grid {
    display: grid;
    /* 2 Columns for Mobile by default */
    grid-template-columns: repeat(2, 1fr); 
    gap: 10px;
}

/* MEDIA QUERY: Desktop (4 columns) */
@media (min-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 20px;
    }
}

/* IMAGE CARD STYLE */
.gallery-item {
    display: flex;
    flex-direction: column;
    /* Subtle animation on entry */
    animation: fadeIn 0.8s ease-in-out;
}

.image-wrapper {
    width: 100%;
    aspect-ratio: 2 / 3; /* Forces vertical portrait shape */
    background-color: #1a1a1a; /* Dark grey placeholder color */
    border-radius: 4px;
    overflow: hidden;
    position: relative;
    border: 2px solid #333;
    transition: all 0.3s ease;
}

.image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ensures image covers area without stretching */
    transition: transform 0.4s ease;
    opacity: 0.9;
}

/* Hover Effect */
.image-wrapper:hover img {
    transform: scale(1.05);
    opacity: 1;
}

.image-wrapper:hover {
    border-color: #ff00de; /* Flashy pink */
    box-shadow: 0 0 15px #ff00de;
}

/* FANCY LABELS */
.label {
    margin-top: 8px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.name {
    font-family: 'Permanent Marker', cursive; /* Cheeky font */
    font-size: 1.2rem;
    color: #ff00de;
    text-shadow: 0 0 5px rgba(255, 0, 222, 0.3);
}

.contact-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.phone-link {
    font-family: 'Righteous', cursive;
    color: #00ffcc; /* Flashy Cyan */
    text-decoration: none;
    font-size: 0.9rem;
    letter-spacing: 1px;
    transition: color 0.3s, text-shadow 0.3s;
}

.phone-link:hover {
    color: #fff;
    text-shadow: 0 0 8px #00ffcc;
}

.whatsapp-link img {
    width: 24px;
    height: 24px;
    transition: transform 0.3s;
    vertical-align: middle;
}

.whatsapp-link:hover img {
    transform: scale(1.2) rotate(10deg);
}

/* If image is missing, hide the broken icon */
img[src=""], img:not([src]) {
    visibility: hidden;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* LOGIN BUTTON */
.login-btn {
    background: transparent;
    border: 1px solid #00ffcc;
    color: #00ffcc;
    padding: 5px 15px;
    font-family: 'Righteous', cursive;
    cursor: pointer;
    margin-right: 15px;
    transition: 0.3s;
}

.login-btn:hover {
    background: #00ffcc;
    color: #000;
    box-shadow: 0 0 10px #00ffcc;
}

/* EDIT BUTTON */
.edit-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    border: 1px solid #ff00de;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    z-index: 10;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.edit-btn:hover {
    background: #ff00de;
    transform: scale(1.1);
    box-shadow: 0 0 10px #ff00de;
}

/* MODAL STYLES */
.modal {
    display: none; 
    position: fixed; 
    z-index: 200; 
    left: 0;
    top: 0;
    width: 100%; 
    height: 100%; 
    background-color: rgba(0,0,0,0.8); 
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: #1a1a1a;
    margin: 15% auto; 
    padding: 20px;
    border: 2px solid #ff00de;
    width: 90%;
    max-width: 400px;
    border-radius: 8px;
    box-shadow: 0 0 20px #ff00de;
    text-align: center;
    color: #fff;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover { color: #fff; }

.form-group { margin-bottom: 15px; text-align: left; }
.form-group label { display: block; margin-bottom: 5px; color: #00ffcc; }
.form-group input, .form-group textarea, #passwordInput {
    width: 100%; padding: 10px; background: #333; border: 1px solid #555; color: #fff; border-radius: 4px;
}
.file-input {
    margin-bottom: 10px;
    cursor: pointer;
}
.action-btn {
    background: #ff00de; color: #fff; border: none; padding: 10px 20px; 
    font-family: 'Righteous', cursive; cursor: pointer; font-size: 1rem; margin-top: 10px;
}
.description-text { font-family: sans-serif; font-size: 0.85rem; color: #ccc; margin: 5px 0; white-space: pre-wrap; }

/* logs table styling */
#logsTable {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    color: #e0e0e0;
    font-family: sans-serif;
    font-size: 0.9rem;
}
#logsTable th, #logsTable td {
    border: 1px solid #444;
    padding: 6px 8px;
    text-align: left;
}
#logsTable th {
    background: #333;
    position: sticky;
    top: 0;
}
#logsTable tr:nth-child(even) {
    background: #1a1a1a;
}