#tab-upload,
#view-upload {
    display: none !important;
}

#view-gallery {
    display: block !important;
}
:root {
    /* Brand Colors (NJM Theme) */
    --primary: #003A70; /* Deep Blue */
    --primary-light: #004c91;
    --secondary: #0073CF; /* Accent Blue */
    --secondary-hover: #005a9e;
    --background: #F4F7F9;
    --surface: #FFFFFF;
    --text-main: #333333;
    --text-muted: #666666;
    --border: #E0E6ED;
    --error: #D32F2F;
    --success: #2E7D32;
    
    /* Typography */
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Open Sans', sans-serif;
    
    /* Spacing & Borders */
    --radius: 12px;
    --radius-sm: 8px;
    --shadow: 0 10px 30px rgba(0, 58, 112, 0.08);
    --shadow-hover: 0 15px 35px rgba(0, 58, 112, 0.12);
}

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

body {
    font-family: var(--font-body);
    color: var(--text-main);
    background-color: var(--background);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* Utilities */
.hidden { display: none !important; }
.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
}
.mt-4 { margin-top: 1.5rem; }

/* Header */
.site-header {
    background-color: var(--surface);
    padding: 20px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    position: relative;
    z-index: 10;
}
.business-name {
    font-family: var(--font-heading);
    font-weight: 800;
    color: var(--primary);
    font-size: 1.5rem;
    letter-spacing: -0.5px;
}

/* Hero */
.hero {
    position: relative;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    background-color: var(--primary);
    padding: 80px 20px;
    text-align: center;
    color: white;
}
.hero::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(to bottom, rgba(0, 58, 112, 0.8), rgba(0, 58, 112, 0.6));
    z-index: 1;
}
.hero-content {
    max-width: 700px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}
.hero-label {
    display: inline-block;
    padding: 6px 16px;
    background-color: rgba(255,255,255,0.2);
    backdrop-filter: blur(4px);
    border-radius: 99px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 20px;
}
.hero h1 {
    font-family: var(--font-heading);
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 16px;
    text-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}
.hero p {
    font-size: 1.1rem;
    opacity: 0.95;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}

/* Main Layout */
.main-content {
    margin-top: -40px;
    margin-bottom: 60px;
    position: relative;
    z-index: 5;
}

/* Status Panel */
.status-panel {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 40px;
    text-align: center;
    box-shadow: var(--shadow);
    margin-bottom: 40px;
}
.status-panel h3 {
    font-family: var(--font-heading);
    color: var(--primary);
    font-size: 1.8rem;
    margin-bottom: 10px;
}

/* Tabs */
.tabs {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 30px;
}
.tab-btn {
    padding: 12px 24px;
    background: var(--surface);
    border: 2px solid transparent;
    border-radius: 99px;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}
.tab-btn:hover {
    color: var(--primary);
    transform: translateY(-2px);
}
.tab-btn.active {
    background: var(--primary);
    color: white;
    box-shadow: 0 8px 20px rgba(0, 58, 112, 0.2);
}

/* Cards */
.card {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 40px;
    box-shadow: var(--shadow);
}
.form-card {
    max-width: 600px;
    margin: 0 auto;
}

/* Form Styles */
.form-header {
    text-align: center;
    margin-bottom: 30px;
}
.form-header h2 {
    font-family: var(--font-heading);
    color: var(--primary);
    margin-bottom: 8px;
}
.form-header p {
    color: var(--text-muted);
}
.form-group {
    margin-bottom: 20px;
}
.form-row {
    display: flex;
    gap: 20px;
}
.form-row .form-group {
    flex: 1;
}
label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--primary);
    font-size: 0.95rem;
}
input[type="text"],
input[type="email"],
textarea {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 1rem;
    transition: border-color 0.3s, box-shadow 0.3s;
    background: #fcfcfc;
}
input:focus, textarea:focus {
    outline: none;
    border-color: var(--secondary);
    box-shadow: 0 0 0 3px rgba(0, 115, 207, 0.1);
    background: #fff;
}

/* File Upload Area */
.file-drop-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    border: 2px dashed var(--secondary);
    border-radius: var(--radius);
    background: rgba(0, 115, 207, 0.05);
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
}
.file-drop-area:hover, .file-drop-area.has-file {
    background: rgba(0, 115, 207, 0.1);
}
.file-icon {
    font-size: 2.5rem;
    margin-bottom: 10px;
}
.file-msg {
    font-weight: 600;
    color: var(--primary);
}
.file-input {
    display: none;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    border: none;
    border-radius: var(--radius-sm);
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}
.btn-primary {
    background: var(--secondary);
    color: white;
}
.btn-primary:hover {
    background: var(--secondary-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(0, 115, 207, 0.2);
}
.btn-secondary {
    background: #e9ecef;
    color: var(--primary);
}
.btn-secondary:hover {
    background: #dde2e6;
}
.btn-block {
    width: 100%;
}
.btn-sm {
    padding: 8px 16px;
    font-size: 0.85rem;
}

/* Alerts */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
    font-size: 0.95rem;
}
.alert-error {
    background: #ffebee;
    color: var(--error);
    border: 1px solid #ffcdd2;
}

/* Success State & Sharing */
.success-card {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}
.success-icon {
    width: 64px;
    height: 64px;
    background: var(--success);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin: 0 auto 20px;
}
.share-box {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid var(--border);
}
.share-input-group {
    display: flex;
    margin-top: 16px;
    gap: 10px;
}
.share-input-group input {
    flex: 1;
    background: #f5f5f5;
    color: var(--text-muted);
}
.copy-success {
    color: var(--success);
    font-size: 0.85rem;
    margin-top: 8px;
    font-weight: 600;
}

/* Gallery Header */
.gallery-header {
    text-align: center;
    margin-bottom: 40px;
}
.gallery-header h2 {
    font-family: var(--font-heading);
    color: var(--primary);
}

/* Gallery Grid */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}
.gallery-card {
    background: var(--surface);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s;
    cursor: pointer;
}
.gallery-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}
.gallery-img-wrap {
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #eee;
}
.gallery-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}
.gallery-card:hover .gallery-img-wrap img {
    transform: scale(1.05);
}
.gallery-info {
    padding: 16px;
}
.gallery-caption {
    font-size: 0.95rem;
    color: var(--text-main);
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.gallery-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border);
    padding-top: 12px;
}
.gallery-author {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 600;
}

/* Vote Button States */
.vote-btn {
    background: transparent;
    color: var(--secondary);
    border: 1px solid var(--secondary);
    display: flex;
    align-items: center;
    gap: 6px;
}
.vote-btn:hover:not(:disabled) {
    background: var(--secondary);
    color: white;
}
.vote-btn.voted, .vote-btn:disabled {
    background: var(--primary-light);
    color: white;
    border-color: var(--primary-light);
    cursor: default;
    transform: none;
    box-shadow: none;
}
.vote-btn.voted .vote-icon { color: #ff4d4f; }
.vote-count { font-weight: 700; }

/* Loaders & Actions */
.gallery-actions {
    text-align: center;
}
.loader {
    width: 30px;
    height: 30px;
    border: 3px solid rgba(0, 115, 207, 0.2);
    border-top-color: var(--secondary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}
@keyframes spin { 100% { transform: rotate(360deg); } }

/* Lightbox */
.lightbox {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.lightbox-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.85);
    backdrop-filter: blur(5px);
}
.lightbox-content {
    position: relative;
    background: var(--surface);
    border-radius: var(--radius);
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 1001;
    box-shadow: 0 25px 50px rgba(0,0,0,0.5);
}
.lightbox-close {
    position: absolute;
    top: 15px; right: 15px;
    width: 36px; height: 36px;
    border-radius: 50%;
    background: rgba(0,0,0,0.5);
    color: white;
    border: none;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: background 0.3s;
}
.lightbox-close:hover { background: rgba(0,0,0,0.8); }
.lightbox-image-container {
    background: #000;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    min-height: 300px;
}
.lightbox-image-container img {
    max-width: 100%;
    max-height: 70vh;
    object-fit: contain;
}
.lightbox-info {
    padding: 20px;
    background: var(--surface);
}
.lightbox-caption {
    font-size: 1.1rem;
    margin-bottom: 15px;
}
.lightbox-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Footer Slot */
.footer-container {
    padding: 40px 20px;
    display: flex;
    justify-content: center;
}

/* Responsive */
@media (max-width: 768px) {
    .hero { padding: 60px 20px; }
    .hero h1 { font-size: 2.2rem; }
    .form-row { flex-direction: column; gap: 0; }
    .status-panel, .card { padding: 24px; }
}
