/*
============================================================
SAGGU TATTOOS - MAIN STYLESHEET
============================================================
*/

/* --- Global & Fonts --- */
:root {
    --primary-color: #0ff; /* Neon Cyan */
    --secondary-color: #f0f; /* Neon Magenta */
    --dark-bg: #010008;
    --text-color: #e0e0e0;
    --border-glow: rgba(0, 255, 255, 0.7);
    --danger-red: #ff4d4d;
}

body {
    background-color: var(--dark-bg);
    color: var(--text-color);
    font-family: 'Rajdhani', sans-serif;
    margin: 0;
    overflow-x: hidden;
    line-height: 1.6;
}

.container {
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

/* --- Animated Background --- */
@keyframes move-twink-back {
    from {background-position:0 0;}
    to {background-position:-10000px 5000px;}
}






/* --- Header & Navigation --- */
.main-header {
    background: rgba(10, 10, 25, 0.5);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-glow);
    padding: 1rem 2rem;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.logo {
    font-family: 'Orbitron', sans-serif;
    font-size: 2rem;
    color: var(--primary-color);
    text-decoration: none;
    text-shadow: 0 0 10px var(--primary-color);
    white-space: nowrap;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 2rem;
    margin: 0;
    padding: 0;
    flex-wrap: wrap;
    justify-content: center;
}

.nav-links a {
    color: var(--text-color);
    text-decoration: none;
    font-size: 1.2rem;
    padding-bottom: 5px;
    border-bottom: 2px solid transparent;
    transition: color 0.3s, text-shadow 0.3s, border-color 0.3s;
}

.nav-links a:hover {
    color: var(--primary-color);
    text-shadow: 0 0 5px var(--primary-color);
    border-bottom-color: var(--primary-color);
}

/* --- Glitch Effect for Titles --- */
.glitch {
    position: relative;
    font-family: 'Orbitron', sans-serif;
    color: var(--primary-color);
    text-shadow: 0 0 10px var(--primary-color), 0 0 20px var(--primary-color);
}
/* THE FIX: Restoring the keyframes and before/after pseudo-elements */
.glitch::before, .glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--dark-bg);
    overflow: hidden;
}
.glitch::before {
    left: 2px;
    text-shadow: -2px 0 var(--secondary-color);
    animation: glitch-anim-1 2s infinite linear alternate-reverse;
}
.glitch::after {
    left: -2px;
    text-shadow: -2px 0 var(--primary-color), 2px 2px var(--secondary-color);
    animation: glitch-anim-2 2s infinite linear alternate-reverse;
}
@keyframes glitch-anim-1 {
    0% { clip: rect(42px, 9999px, 44px, 0); } 10% { clip: rect(12px, 9999px, 85px, 0); } 20% { clip: rect(90px, 9999px, 57px, 0); } 30% { clip: rect(74px, 9999px, 41px, 0); } 40% { clip: rect(10px, 9999px, 60px, 0); } 50% { clip: rect(80px, 9999px, 20px, 0); } 60% { clip: rect(50px, 9999px, 100px, 0); } 70% { clip: rect(25px, 9999px, 70px, 0); } 80% { clip: rect(65px, 9999px, 35px, 0); } 90% { clip: rect(0px, 9999px, 88px, 0); } 100% { clip: rect(42px, 9999px, 44px, 0); }
}
@keyframes glitch-anim-2 {
    0% { clip: rect(33px, 9999px, 99px, 0); } 10% { clip: rect(77px, 9999px, 11px, 0); } 20% { clip: rect(20px, 9999px, 80px, 0); } 30% { clip: rect(55px, 9999px, 15px, 0); } 40% { clip: rect(95px, 9999px, 45px, 0); } 50% { clip: rect(5px, 9999px, 65px, 0); } 60% { clip: rect(40px, 9999px, 90px, 0); } 70% { clip: rect(10px, 9999px, 30px, 0); } 80% { clip: rect(70px, 9999px, 0px, 0); } 90% { clip: rect(50px, 9999px, 25px, 0); } 100% { clip: rect(33px, 9999px, 99px, 0); }
}


/* --- General Page Styles --- */
h1 { font-size: 4rem; margin-bottom: 0; text-align: center; }
h2 { font-size: 2.5rem; margin-bottom: 0; }
.subtitle { font-size: 1.5rem; color: var(--text-color); margin-top: 0.5rem; font-weight: 300; text-align: center; margin-bottom: 3rem; }
p { margin-bottom: 1rem; line-height: 1.8; }

/* --- Button Styles --- */
.btn { padding: 15px 30px; border: 2px solid var(--primary-color); color: var(--primary-color); background: transparent; text-decoration: none; font-size: 1.2rem; font-weight: 700; cursor: pointer; position: relative; overflow: hidden; transition: color 0.4s; display: inline-block; margin-top: 1rem; text-align: center; }
.btn .btn-text { position: relative; z-index: 2; }
.btn::before { content: ''; position: absolute; top: 0; left: -100%; width: 100%; height: 100%; background: var(--primary-color); transition: left 0.4s; z-index: 1; }
.btn:hover { color: var(--dark-bg); }
.btn:hover::before { left: 0; }
.btn-secondary { border-color: var(--secondary-color); color: var(--secondary-color); }
.btn-secondary::before { background: var(--secondary-color); }
.btn-secondary:hover { color: var(--dark-bg); }
button:disabled { opacity: 0.5; cursor: not-allowed; border-color: #555; color: #555; }
button:disabled:hover::before { content: none; }

/* --- Footer --- */
.main-footer { background: rgba(10, 10, 25, 0.5); backdrop-filter: blur(10px); border-top: 1px solid var(--border-glow); padding: 1.5rem; text-align: center; font-size: 0.9rem; color: #aaa; margin-top: 4rem; position: relative; z-index: 2; }
.footer-credit { margin-top: 0.5rem; color: var(--primary-color); text-shadow: 0 0 5px var(--primary-color); }

/* --- Home Page Specifics --- */
.hero { min-height: calc(100vh - 100px); display: flex; justify-content: center; align-items: center; text-align: center; }
.hero-content { padding: 2rem; background: rgba(0, 0, 0, 0.4); border-radius: 10px; box-shadow: 0 0 20px rgba(0, 255, 255, 0.3); }

/* --- About & Contact Pages --- */
.about-page .content-section, .contact-page .content-section { background: rgba(10, 10, 25, 0.5); padding: 2.5rem; border-radius: 8px; border: 1px solid rgba(0, 255, 255, 0.2); box-shadow: 0 0 15px rgba(0, 255, 255, 0.1); }
.content-body { max-width: 800px; margin: 0 auto; font-size: 1.1rem; color: #c0c0c0; }
.contact-details { display: flex; gap: 2rem; flex-wrap: wrap; margin-top: 2rem; font-size: 1.1rem; }
.contact-info, .map-container { flex: 1; min-width: 300px; }
.contact-info h3 { color: var(--secondary-color); margin-bottom: 1rem; border-bottom: 1px solid rgba(240, 0, 240, 0.3); padding-bottom: 0.5rem; }
.social-links a { display: inline-block; margin-right: 1rem; color: var(--primary-color); text-decoration: none; font-weight: 700; transition: text-shadow 0.3s, transform 0.3s; }
.social-links a:hover { text-shadow: 0 0 10px var(--primary-color); transform: translateY(-3px); }
.map-container { border: 1px solid var(--border-glow); border-radius: 5px; overflow: hidden; }
.map-container iframe { width: 100%; height: 450px; border: 0; display: block; }

/* --- Admin Panel & Forms --- */
.login-page, .admin-page { padding-top: 4rem; padding-bottom: 4rem; }
.login-section { max-width: 500px; margin: 0 auto; background: rgba(10, 10, 25, 0.7); padding: 2.5rem; border-radius: 8px; border: 1px solid rgba(0, 255, 255, 0.2); text-align: center; }
.upload-form, .login-form, .category-form, .profile-form { margin-top: 1.5rem; padding: 1.5rem; border: 1px solid #444; border-radius: 5px; background: rgba(0, 0, 0, 0.2); }
.form-group { margin-bottom: 1.5rem; }
.form-label { display: block; margin-bottom: 0.5rem; font-size: 1.1rem; color: var(--primary-color); }
.form-control { width: calc(100% - 20px); padding: 10px; background: #1a1a2e; border: 1px solid var(--primary-color); color: var(--text-color); font-size: 1rem; border-radius: 3px; }
.form-control:focus { outline: none; border-color: var(--secondary-color); box-shadow: 0 0 8px rgba(240, 0, 240, 0.5); }
.error-message { color: var(--danger-red); background: rgba(255, 0, 0, 0.2); border: 1px solid var(--danger-red); padding: 1rem; margin: 1rem 0; text-align: center; border-radius: 5px; }
.success-message { color: #4dff88; background: rgba(0, 255, 85, 0.2); border: 1px solid #4dff88; padding: 1rem; margin: 1rem 0; text-align: center; border-radius: 5px; }
.admin-header { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem; margin-bottom: 2rem; }
.admin-grid { display: grid; grid-template-columns: 1fr; gap: 2rem; margin-top: 2rem; }
@media (min-width: 992px) { .admin-grid { grid-template-columns: 2fr 1fr; } }
.admin-section { background: rgba(10, 10, 25, 0.5); padding: 2rem; border: 1px solid var(--border-glow); border-radius: 8px; }
.admin-section h2 { margin-top: 0; margin-bottom: 1.5rem; }
.category-list h3 { color: var(--primary-color); border-bottom: 1px solid var(--primary-color); padding-bottom: 0.5rem; margin-bottom: 1rem; }
.category-list ul { list-style: none; padding: 0; margin: 0; }
.category-list li { display: flex; justify-content: space-between; align-items: center; padding: 0.75rem 0; border-bottom: 1px solid #333; }
.btn-delete { background: transparent; border: 1px solid var(--danger-red); color: var(--danger-red); padding: 5px 10px; cursor: pointer; }
.btn-delete:hover { background-color: var(--danger-red); color: var(--dark-bg); }
.danger-zone { margin-top: 4rem; padding: 2.5rem; border: 2px solid var(--danger-red); border-radius: 8px; background: rgba(255, 0, 0, 0.1); text-align: center; }
.danger-zone h2 { color: var(--danger-red); }
.danger-zone p { color: #ffb3b3; max-width: 700px; margin: 0 auto 2rem auto; }
.btn-danger { border-color: var(--danger-red); color: var(--danger-red); }
.btn-danger::before { background: var(--danger-red); }
.btn-danger:hover { color: var(--dark-bg); }

/* --- Admin Gallery for Photo Management --- */
.admin-gallery-section { margin-bottom: 3rem; background: rgba(10, 10, 25, 0.5); padding: 2rem; border-radius: 8px; }
.admin-gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 1rem; }
.admin-thumb { position: relative; border: 2px solid #444; border-radius: 5px; overflow: hidden; }
.admin-thumb img { display: block; width: 100%; height: 150px; object-fit: cover; }
.btn-photo-delete { position: absolute; top: 5px; right: 5px; width: 30px; height: 30px; background-color: rgba(255, 77, 77, 0.8); color: white; border: none; border-radius: 50%; font-size: 20px; text-align: center; cursor: pointer; }
.btn-photo-delete:hover { background-color: rgba(255, 0, 0, 1); transform: scale(1.1); }

/* --- Tabbed Gallery Theme --- */
.gallery-container { background: rgba(10, 10, 25, 0.5); padding: 0; border-radius: 8px; border: 1px solid rgba(0, 255, 255, 0.2); overflow: hidden; }
ul.gallery-tabs { list-style: none; padding: 0; margin: 0; display: flex; background-color: rgba(0, 0, 0, 0.4); }
ul.gallery-tabs li { padding: 15px 25px; cursor: pointer; font-size: 1.2rem; font-weight: 500; color: var(--text-color); border-bottom: 3px solid transparent; transition: background-color 0.3s, color 0.3s, border-color 0.3s; text-align: center; flex-grow: 1; }
ul.gallery-tabs li:hover { background-color: rgba(0, 255, 255, 0.1); color: var(--primary-color); }
ul.gallery-tabs li.active { color: var(--primary-color); text-shadow: 0 0 10px var(--primary-color); border-bottom: 3px solid var(--primary-color); background-color: rgba(0, 255, 255, 0.05); }
.gallery-content { padding: 2.5rem; }
.gallery-pane { display: none; animation: fadeIn 0.5s; }
.gallery-pane.active { display: block; }
.lightgallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 15px; }
.gallery-item { display: block; overflow: hidden; border: 2px solid #222; transition: all 0.3s ease-in-out; border-radius: 5px; }
.gallery-item img { width: 100%; height: 250px; object-fit: cover; display: block; transition: transform 0.5s ease-in-out; }
.gallery-item:hover { transform: scale(1.03); border-color: var(--primary-color); box-shadow: 0 0 15px var(--primary-color); }
.gallery-item:hover img { transform: scale(1.1); }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/*
============================================================
CUSTOM LIGHTBOX STYLES (LICENSE-FREE)
============================================================
*/
#custom-lightbox { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; background-color: rgba(0, 0, 0, 0.85); z-index: 2000; display: flex; justify-content: center; align-items: center; opacity: 0; visibility: hidden; transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out; }
#custom-lightbox.active { opacity: 1; visibility: visible; }
.lightbox-content { position: relative; }
.lightbox-image { max-width: 90vw; max-height: 85vh; display: block; object-fit: contain; border: 3px solid var(--primary-color); box-shadow: 0 0 40px var(--primary-color); animation: zoomIn 0.4s; }
.lightbox-close, .lightbox-prev, .lightbox-next { position: absolute; color: #fff; cursor: pointer; font-weight: bold; user-select: none; transition: color 0.3s; }
.lightbox-close:hover, .lightbox-prev:hover, .lightbox-next:hover { color: var(--primary-color); }
.lightbox-close { top: 20px; right: 30px; font-size: 45px; }
.lightbox-prev, .lightbox-next { top: 50%; transform: translateY(-50%); font-size: 60px; padding: 10px; }
.lightbox-prev { left: 20px; }
.lightbox-next { right: 20px; }
@keyframes zoomIn { from { transform: scale(0.8); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/*
============================================================
CUSTOM SCROLL ANIMATION STYLES (LICENSE-FREE)
============================================================
*/
.animate-on-scroll { opacity: 0; transform: translateY(40px); transition: opacity 0.8s ease-out, transform 0.8s ease-out; }
.animate-on-scroll.visible { opacity: 1; transform: translateY(0); }

/*
============================================================
MOBILE RESPONSIVE FIXES
============================================================
*/
@media (max-width: 768px) {
    .navbar { flex-direction: column; text-align: center; }
    h1 { font-size: 3rem; }
    h2 { font-size: 2rem; }
    .subtitle { font-size: 1.2rem; }
    .container { padding: 1rem; }
    .hero-content { padding: 1.5rem; margin: 0 1rem; }
    .hero-content .btn { width: auto; padding: 12px 25px; font-size: 1rem; }

    /* LIGHTBOX CONTROLS FIX */
  /* --- PASTE THIS NEW CODE IN ITS PLACE --- */
/* --- LIGHTBOX CONTROLS FIX --- */
/* Increase size, add spacing, and fix z-index for mobile usability */
.lightbox-prev, .lightbox-next, .lightbox-close {
    z-index: 2001; /* THE FIX: Ensures buttons are on top of the background */
}

.lightbox-prev, .lightbox-next {
    font-size: 44px;
    padding: 10px;
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
}
.lightbox-prev {
    left: 15px;
}
.lightbox-next {
    right: 15px;
}
.lightbox-close {
    top: 15px;
    right: 15px;
    font-size: 40px;
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    /* THE FIX: Using Flexbox for perfect centering of the 'x' */
    display: flex;
    justify-content: center;
    align-items: center;
}

    /* GALLERY FIXES */
    .gallery-tabs li { font-size: 1rem; padding: 12px 10px; }
    .gallery-content { padding: 1.5rem; }
    .lightgallery-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
    .gallery-item img { height: 120px; }

    /* ADMIN FIXES */
    .admin-gallery-grid { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); }
    .admin-thumb img { height: 100px; }
}