:root {
    --bg-dark: #070b13;
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-bg-hover: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.09);
    --glass-border-focus: rgba(255, 255, 255, 0.22);
    --glass-shadow: 0 16px 40px 0 rgba(0, 0, 0, 0.3), inset 0 1px 2px rgba(255, 255, 255, 0.15);
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --liquid-blue: linear-gradient(135deg, #00c6ff 0%, #0072ff 100%);
    --liquid-purple: linear-gradient(135deg, #f39c12 0%, #d35400 100%);
    --liquid-pink: linear-gradient(135deg, #ec4899 0%, #8b5cf6 100%);
    --accent: #00d2ff;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --danger-hover: #dc2626;
    --font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-dark);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2.5rem 1rem;
    overflow-x: hidden;
    position: relative;
}

a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

a:hover {
    color: #ffffff;
    text-shadow: 0 0 10px rgba(0, 210, 255, 0.5);
}

/* Morphing Liquid Background Blobs */
.bg-blobs {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -2;
    overflow: hidden;
    pointer-events: none;
}

.blob {
    position: absolute;
    filter: blur(100px);
    opacity: 0.22;
    animation: float 25s infinite alternate ease-in-out, morph 18s infinite alternate ease-in-out;
}

.blob-1 {
    width: 480px;
    height: 480px;
    background: var(--liquid-blue);
    top: -120px;
    left: -120px;
}

.blob-2 {
    width: 580px;
    height: 580px;
    background: var(--liquid-pink);
    bottom: -180px;
    right: -120px;
    animation-delay: -6s;
}

.blob-3 {
    width: 380px;
    height: 380px;
    background: var(--liquid-purple);
    top: 35%;
    left: 45%;
    animation-delay: -12s;
}

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(60px, 40px) scale(1.05); }
    100% { transform: translate(-30px, 60px) scale(0.95); }
}

@keyframes morph {
    0% { border-radius: 40% 60% 60% 40% / 40% 40% 60% 60%; }
    34% { border-radius: 70% 30% 50% 50% / 30% 60% 40% 70%; }
    67% { border-radius: 50% 60% 30% 70% / 60% 30% 60% 40%; }
    100% { border-radius: 40% 60% 60% 40% / 40% 40% 60% 60%; }
}

/* Liquid Glass Cards */
.glass-container {
    background: var(--glass-bg);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    box-shadow: var(--glass-shadow);
    padding: 2.25rem;
    width: 100%;
    max-width: 480px;
    margin: 1.5rem auto;
    z-index: 1;
    transition: border-color 0.4s ease, box-shadow 0.4s ease;
}

.glass-container:hover {
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 20px 48px 0 rgba(0, 0, 0, 0.35), inset 0 1px 2px rgba(255, 255, 255, 0.25);
}

.glass-container.large {
    max-width: 1000px;
}

.glass-header {
    text-align: center;
    margin-bottom: 2.25rem;
}

.glass-header h2 {
    font-size: 1.85rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #ffffff;
    text-shadow: 0 2px 10px rgba(255, 255, 255, 0.05);
    margin-bottom: 0.4rem;
}

.glass-header p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Header & Navigation */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-bottom: 1.75rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--glass-border);
}

.dashboard-title h2 {
    font-size: 1.35rem;
    font-weight: 700;
    color: #ffffff;
}

.dashboard-title p {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.nav-buttons {
    display: flex;
    gap: 0.65rem;
    align-items: center;
}

/* Inputs & Form Groups */
.form-group {
    margin-bottom: 1.25rem;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 0.4rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: 10px;
    border: 1px solid var(--glass-border);
    background: rgba(0, 0, 0, 0.3);
    color: var(--text-primary);
    font-size: 0.92rem;
    transition: all 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--glass-border-focus);
    background: rgba(0, 0, 0, 0.45);
    box-shadow: 0 0 12px rgba(255, 255, 255, 0.06);
}

textarea.form-control {
    resize: vertical;
    min-height: 80px;
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2394a3b8'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.85rem center;
    background-size: 1.1rem;
    padding-right: 2.25rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.25rem;
    border-radius: 10px;
    border: none;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    gap: 0.4rem;
}

.btn-primary {
    background: rgba(255, 255, 255, 0.92);
    color: #0c0f17;
}

.btn-primary:hover {
    background: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 5px 15px rgba(255, 255, 255, 0.12);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

.btn-danger {
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #fca5a5;
}

.btn-danger:hover {
    background: rgba(239, 68, 68, 0.35);
    border-color: rgba(239, 68, 68, 0.5);
    transform: translateY(-1px);
}

.btn-sm {
    padding: 0.45rem 0.85rem;
    font-size: 0.82rem;
    border-radius: 8px;
}

/* Alerts */
.alert {
    padding: 0.85rem 1.1rem;
    border-radius: 10px;
    margin-bottom: 1.25rem;
    font-size: 0.85rem;
    font-weight: 500;
    border: 1px solid rgba(239, 68, 68, 0.15);
    background: rgba(239, 68, 68, 0.08);
    color: #fca5a5;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.alert.success {
    border-color: rgba(16, 185, 129, 0.15);
    background: rgba(16, 185, 129, 0.08);
    color: #a7f3d0;
}

/* Photo Gallery Grid */
.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.5rem;
    margin-top: 1.25rem;
}

.photo-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--glass-border);
    border-radius: 14px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
}

.photo-card:hover {
    transform: translateY(-3px);
    border-color: rgba(255, 255, 255, 0.18);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
}

.photo-img-wrapper {
    position: relative;
    width: 100%;
    padding-top: 66.66%;
    overflow: hidden;
    cursor: pointer;
}

.photo-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.photo-card:hover .photo-img {
    transform: scale(1.03);
}

.photo-details {
    padding: 1.1rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.photo-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.4rem;
    color: #ffffff;
    line-height: 1.3;
}

.photo-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.85rem;
    line-height: 1.45;
    flex-grow: 1;
}

.photo-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--glass-border);
    padding-top: 0.65rem;
    margin-top: auto;
    font-size: 0.72rem;
    color: var(--text-secondary);
}

.photo-user-badge {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    padding: 0.15rem 0.5rem;
    border-radius: 9999px;
    font-weight: 500;
}

/* Lightbox Modal */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(5, 7, 12, 0.94);
    backdrop-filter: blur(12px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    padding: 2rem;
}

.lightbox.active {
    opacity: 1;
    pointer-events: auto;
}

.lightbox-content {
    max-width: 90%;
    max-height: 70vh;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0,0,0,0.6);
    transform: scale(0.97);
    transition: transform 0.3s ease;
}

.lightbox.active .lightbox-content {
    transform: scale(1);
}

.lightbox-content img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 70vh;
    object-fit: contain;
}

.lightbox-caption {
    margin-top: 1.25rem;
    text-align: center;
    max-width: 600px;
    color: #ffffff;
}

.lightbox-caption h3 {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 0.3rem;
}

.lightbox-caption p {
    font-size: 0.88rem;
    color: var(--text-secondary);
}

.lightbox-close {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 50%;
    color: white;
    font-size: 1.25rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.12);
}

/* Statistics Widgets */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--glass-border);
    padding: 1.25rem;
    border-radius: 12px;
    text-align: center;
}

.stat-val {
    font-size: 1.75rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 0.2rem;
}

.stat-label {
    font-size: 0.78rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.04em;
}

/* Admin Two-Column Layout */
.admin-layout {
    display: grid;
    grid-template-columns: 340px 1fr;
    gap: 1.75rem;
    align-items: start;
}

.admin-sidebar {
    position: sticky;
    top: 2rem;
}

@media (max-width: 900px) {
    .admin-layout {
        grid-template-columns: 1fr;
    }
    .admin-sidebar {
        position: static;
    }
}

/* Tables styling */
.glass-table-wrapper {
    overflow-x: auto;
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    background: rgba(0, 0, 0, 0.25);
}

.glass-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.glass-table th, 
.glass-table td {
    padding: 0.85rem 1.1rem;
    font-size: 0.88rem;
    border-bottom: 1px solid var(--glass-border);
}

.glass-table th {
    background: rgba(0, 0, 0, 0.4);
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.72rem;
    letter-spacing: 0.04em;
}

.glass-table tbody tr {
    transition: background 0.3s;
}

.glass-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.015);
}

.glass-table tbody tr:last-child td {
    border-bottom: none;
}

.table-thumb {
    width: 50px;
    height: 35px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid var(--glass-border);
}

/* Empty States */
.empty-state {
    text-align: center;
    padding: 3.5rem 1.5rem;
    color: var(--text-secondary);
}

.empty-state-icon {
    font-size: 2.5rem;
    margin-bottom: 0.85rem;
    opacity: 0.8;
}

.empty-state h3 {
    color: var(--text-primary);
    margin-bottom: 0.4rem;
    font-size: 1.15rem;
}

.empty-state p {
    font-size: 0.9rem;
    max-width: 300px;
    margin: 0 auto;
}

.text-center {
    text-align: center;
}

.mt-4 {
    margin-top: 1rem;
}
