/* Design System & Variables */
:root {
    --primary-color: #b76e79; /* Elegant Rose Gold */
    --primary-hover: #9c5863;
    --primary-light: #f5e6e8;
    --secondary-color: #d4af37; /* Warm Gold */
    --secondary-hover: #b89326;
    --bg-color: #FAF6F0; /* Soft Champagne/Cream */
    --card-bg: rgba(255, 255, 255, 0.82);
    --text-color: #2D2D2D;
    --text-muted: #6B6B6B;
    --border-color: rgba(212, 175, 55, 0.25); /* Subtle Gold Border */
    --danger-color: #c94a4a;
    --success-color: #5bb381;
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --shadow: 0 8px 32px 0 rgba(183, 110, 121, 0.06);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/* Background Blobs (Dynamic Animated Background) */
.bg-blob {
    position: fixed;
    width: 350px;
    height: 350px;
    border-radius: 50%;
    filter: blur(100px);
    z-index: -2;
    opacity: 0.35;
    animation: drift 20s infinite alternate ease-in-out;
    pointer-events: none;
}

.bg-blob-1 {
    background: #b76e79; /* Rose Gold */
    top: -100px;
    left: -100px;
}

.bg-blob-2 {
    background: #d4af37; /* Warm Gold */
    bottom: -100px;
    right: -100px;
    animation-delay: -5s;
}

@keyframes drift {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(80px, 100px) scale(1.15); }
    100% { transform: translate(-40px, 40px) scale(0.9); }
}

/* Monogram (H & U Design) */
.monogram-wrapper {
    display: flex;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.monogram {
    font-family: 'Playfair Display', serif;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--secondary-color);
    border: 1.5px solid var(--border-color);
    padding: 0.4rem 1.2rem;
    border-radius: 50px;
    letter-spacing: 3px;
    text-transform: uppercase;
    background: rgba(255, 255, 255, 0.4);
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.05);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Glassmorphism Cards */
.glass-card {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: 2.5rem;
    transition: var(--transition);
}

.glass-card:hover {
    border-color: rgba(212, 175, 55, 0.4);
    box-shadow: 0 12px 40px 0 rgba(183, 110, 121, 0.1);
}

/* Typography */
.elegant-title {
    font-family: 'Playfair Display', serif;
    font-weight: 600;
    font-size: 2.2rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    text-align: center;
}

.elegant-subtitle {
    font-family: 'Inter', sans-serif;
    font-weight: 300;
    font-size: 1rem;
    color: var(--text-muted);
    text-align: center;
    margin-bottom: 2rem;
}

.heart-icon {
    font-size: 2.5rem;
    display: block;
    text-align: center;
    margin-bottom: 0.5rem;
    animation: heartBeat 2s infinite;
}

@keyframes heartBeat {
    0% { transform: scale(1); }
    14% { transform: scale(1.12); }
    28% { transform: scale(1); }
    42% { transform: scale(1.12); }
    70% { transform: scale(1); }
}

/* Layouts */
.elegant-container {
    width: 100%;
    max-width: 500px;
    margin: auto;
    padding: 1.5rem;
}

/* Upload Interface */
.upload-zone {
    border: 2px dashed rgba(183, 110, 121, 0.4);
    border-radius: var(--radius-md);
    padding: 3rem 1.5rem;
    text-align: center;
    background: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.upload-zone:hover, .upload-zone.dragover {
    border-color: var(--primary-color);
    background: rgba(183, 110, 121, 0.05);
}

.upload-icon-wrapper {
    width: 70px;
    height: 70px;
    background: var(--primary-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem auto;
    color: var(--primary-color);
    transition: var(--transition);
}

.upload-zone:hover .upload-icon-wrapper {
    transform: translateY(-5px);
    background: var(--primary-color);
    color: #fff;
}

.upload-icon-wrapper svg {
    animation: iconPulse 2.5s infinite ease-in-out;
}

@keyframes iconPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.upload-text {
    font-weight: 500;
    font-size: 1.1rem;
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

.upload-subtext {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    font-size: 0.95rem;
    padding: 0.8rem 1.8rem;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    transition: var(--transition);
    gap: 0.5rem;
}

.btn-primary {
    background: var(--primary-color);
    color: #fff;
    box-shadow: 0 4px 12px rgba(183, 110, 121, 0.2);
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(183, 110, 121, 0.3);
}

.btn-gold {
    background: var(--secondary-color);
    color: #fff;
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.2);
}

.btn-gold:hover {
    background: var(--secondary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(212, 175, 55, 0.3);
}

.btn-outline-danger {
    background: transparent;
    border: 1px solid rgba(201, 74, 74, 0.5);
    color: var(--danger-color);
}

.btn-outline-danger:hover {
    background: var(--danger-color);
    color: #fff;
}

.btn-block {
    display: flex;
    width: 100%;
}

/* Form Styles */
.elegant-form .form-group {
    margin-bottom: 1.5rem;
}

.elegant-form label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.elegant-form input[type="text"],
.elegant-form input[type="password"] {
    width: 100%;
    padding: 0.8rem 1rem;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(0, 0, 0, 0.08);
    background: rgba(255, 255, 255, 0.6);
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
}

.elegant-form input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(183, 110, 121, 0.15);
}

/* Alert Boxes */
.alert {
    padding: 0.8rem 1rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

.alert-danger {
    background-color: rgba(201, 74, 74, 0.08);
    border: 1px solid rgba(201, 74, 74, 0.2);
    color: var(--danger-color);
}

/* Progress Queues */
.upload-queue-container {
    margin-top: 1.5rem;
}

.queue-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.progress-track {
    width: 100%;
    height: 8px;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 4px;
    transition: width 0.15s ease-out;
}

.queue-items {
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid rgba(0, 0, 0, 0.04);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.3);
}

.queue-item {
    display: flex;
    align-items: center;
    padding: 0.6rem 0.8rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
    font-size: 0.85rem;
    gap: 0.8rem;
}

.queue-item:last-child {
    border-bottom: none;
}

.queue-thumbnail {
    width: 36px;
    height: 36px;
    border-radius: 6px;
    object-fit: cover;
    border: 1px solid var(--border-color);
    flex-shrink: 0;
}

.queue-item-name {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.queue-item-status {
    font-weight: 500;
}

.status-waiting { color: var(--text-muted); }
.status-uploading { color: var(--primary-color); font-weight: 600; }
.status-success { color: var(--success-color); }
.status-error { color: var(--danger-color); }

/* Success State Screen */
.success-screen {
    text-align: center;
    padding: 1.5rem 0;
}

.success-icon-wrapper {
    width: 80px;
    height: 80px;
    background: rgba(91, 179, 129, 0.1);
    color: var(--success-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem auto;
}

.success-icon-wrapper svg {
    width: 40px;
    height: 40px;
}

/* Login Layout specific */
.login-body {
    align-items: center;
    justify-content: center;
}

.login-card {
    width: 100%;
}

.login-footer {
    text-align: center;
    margin-top: 1.5rem;
}

.back-link {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.85rem;
    transition: var(--transition);
}

.back-link:hover {
    color: var(--primary-color);
}

/* Admin Dashboard Specific */
.admin-header {
    background: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.header-title-group {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.header-title-group .heart-icon {
    font-size: 1.8rem;
    margin-bottom: 0;
}

.header-title-group h1 {
    font-family: 'Playfair Display', serif;
    font-size: 1.4rem;
    color: var(--primary-color);
}

.header-title-group p {
    font-size: 0.85rem;
    color: var(--text-muted);
    border-left: 1px solid rgba(0, 0, 0, 0.1);
    padding-left: 0.8rem;
}

.header-actions {
    display: flex;
    gap: 0.8rem;
}

.admin-main {
    width: 90%;
    max-width: 1200px;
    margin: 2rem auto;
    flex: 1;
}

.stats-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.02);
}

.stat-value {
    font-size: 2.2rem;
    font-weight: 600;
    color: var(--primary-color);
    line-height: 1.2;
    margin-bottom: 0.3rem;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Gallery Grid */
.gallery-section {
    margin-top: 1rem;
}

.empty-gallery-card {
    text-align: center;
    padding: 5rem 2rem;
    background: rgba(255, 255, 255, 0.5);
    border-radius: var(--radius-lg);
    border: 1px dashed var(--border-color);
}

.empty-gallery-card .sub-text {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
}

.gallery-item-card {
    background: #fff;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02);
    border: 1px solid rgba(0,0,0,0.05);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.gallery-item-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(183, 110, 121, 0.1);
    border-color: rgba(183, 110, 121, 0.2);
}

.gallery-image-wrapper {
    position: relative;
    width: 100%;
    padding-top: 100%; /* 1:1 Square aspect ratio */
    overflow: hidden;
    background-color: #f0f0f0;
}

.gallery-thumbnail {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.gallery-item-card:hover .gallery-thumbnail {
    transform: scale(1.05);
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(45, 45, 45, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    opacity: 0;
    transition: var(--transition);
    backdrop-filter: blur(2px);
}

.gallery-image-wrapper:hover .gallery-overlay {
    opacity: 1;
}

.btn-overlay {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: #fff;
    color: var(--text-color);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    text-decoration: none;
}

.btn-overlay:hover {
    transform: scale(1.1);
    background: var(--primary-color);
    color: #fff;
}

.gallery-item-details {
    padding: 0.8rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fff;
    border-top: 1px solid rgba(0,0,0,0.03);
}

.photo-date {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.btn-delete {
    background: transparent;
    border: none;
    color: var(--danger-color);
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    padding: 0.3rem 0.5rem;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.btn-delete:hover {
    background: rgba(201, 74, 74, 0.08);
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.9);
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.lightbox-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 85vh;
    border-radius: var(--radius-sm);
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
    animation: zoom 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes zoom {
    from {transform:scale(0.85); opacity: 0;} 
    to {transform:scale(1); opacity: 1;}
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
}

.lightbox-close:hover,
.lightbox-close:focus {
    color: var(--primary-color);
    text-decoration: none;
    cursor: pointer;
}

/* Responsive fixes */
@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        text-align: center;
    }
    
    .header-title-group {
        flex-direction: column;
        gap: 0.3rem;
    }
    
    .header-title-group p {
        border-left: none;
        padding-left: 0;
    }
    
    .header-actions {
        width: 100%;
        justify-content: center;
    }
    
    .btn-zip {
        flex: 1;
    }
}
