:root {
    --primary: #0047bb;
    --primary-dark: #001e60;
    --secondary: #e03a3e;
    --bg-page: #f4f6f9;
    --bg-card: #ffffff;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --radius: 12px;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 12px rgba(0,25,80,0.08);
    --shadow-lg: 0 12px 24px rgba(0,25,80,0.12);
    --font-head: 'Outfit', sans-serif;
    --font-body: 'Plus Jakarta Sans', sans-serif;
}

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

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

.hidden { display: none !important; }

/* Hide business name since we have the logo */
#business-name { display: none !important; }

/* Hero */
.hero {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
    padding: 80px 20px;
    text-align: center;
    position: relative;
    color: #fff;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 8px;
    background: linear-gradient(to right, 
        #fdb813 0%, #fdb813 16.66%, 
        #f5821f 16.66%, #f5821f 33.33%, 
        #e03a3e 33.33%, #e03a3e 50%, 
        #963895 50%, #963895 66.66%, 
        #009cdf 66.66%, #009cdf 83.33%, 
        #68bb2d 83.33%, #68bb2d 100%);
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.main-hero-img {
    max-width: 650px;
    width: 100%;
    height: auto;
    margin: 0 auto 24px auto;
    display: block;
    filter: drop-shadow(0 4px 12px rgba(0,0,0,0.3));
}

.hero-subtitle {
    font-size: 1.15rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
    font-weight: 300;
}

/* Main Container */
.main-container {
    max-width: 1200px;
    margin: -40px auto 40px;
    padding: 0 20px;
    position: relative;
    z-index: 10;
    min-height: 60vh;
    display: flex;
    flex-direction: column;
}

/* Tabs */
.tabs-container {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 8px;
    box-shadow: var(--shadow-md);
    margin-bottom: 30px;
    display: flex;
    justify-content: center;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.tabs {
    display: flex;
    width: 100%;
    gap: 8px;
}

.tab-btn {
    flex: 1;
    background: transparent;
    border: none;
    padding: 12px 16px;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-muted);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.tab-btn:hover {
    color: var(--primary);
    background: rgba(0, 71, 187, 0.05);
}

.tab-btn.active {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 2px 4px rgba(0, 71, 187, 0.2);
}

/* Status message */
.status-message {
    background: var(--bg-card);
    padding: 40px;
    text-align: center;
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    font-size: 1.25rem;
    font-weight: 500;
    margin-bottom: 40px;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 80px 20px;
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: 16px;
}

.empty-state h3 {
    font-family: var(--font-head);
    font-size: 1.75rem;
    margin-bottom: 12px;
}

.empty-state p {
    color: var(--text-muted);
    margin-bottom: 30px;
    font-size: 1.1rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 1rem;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.3s ease;
    gap: 8px;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 4px 10px rgba(0, 71, 187, 0.3);
}

.btn-primary:hover:not(:disabled) {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(0, 71, 187, 0.4);
}

.btn-primary:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    background: #f1f5f9;
    color: var(--text-main);
}

.btn-secondary:hover {
    background: #e2e8f0;
}

.btn-block {
    width: 100%;
}

.btn-vote {
    background: rgba(0,0,0,0.05);
    padding: 6px 12px;
    border-radius: 99px;
    font-size: 0.875rem;
    color: var(--text-main);
}

.btn-vote.voted {
    background: rgba(224, 58, 62, 0.1);
    color: var(--secondary);
}

.btn-vote:hover:not(.voted) {
    background: rgba(0,0,0,0.1);
}

/* Gallery Grid */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.gallery-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

.gallery-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}

.card-img-wrap {
    aspect-ratio: 1;
    overflow: hidden;
    background: #f1f5f9;
    position: relative;
}

.card-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-card:hover .card-img-wrap img {
    transform: scale(1.05);
}

.card-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.card-caption {
    font-size: 0.95rem;
    margin-bottom: 20px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.card-author {
    font-weight: 500;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.load-more-container {
    text-align: center;
    margin-top: 40px;
}

/* Forms */
.form-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 40px;
    box-shadow: var(--shadow-lg);
    max-width: 650px;
    margin: 0 auto;
}

.form-header {
    text-align: center;
    margin-bottom: 30px;
}

.form-header h2 {
    font-family: var(--font-head);
    font-size: 2rem;
    color: var(--primary-dark);
    margin-bottom: 8px;
}

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-main);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

@media(max-width: 600px) {
    .form-row { grid-template-columns: 1fr; gap: 0; }
}

.hidden-input {
    display: none;
}

input[type="text"], input[type="email"], textarea {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: 1rem;
    background: #f8fafc;
    transition: all 0.3s ease;
}

input[type="text"]:focus, input[type="email"]:focus, textarea:focus {
    outline: none;
    border-color: var(--primary);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(0, 71, 187, 0.1);
}

/* File Upload */
.file-upload-group {
    margin-bottom: 30px;
}

.file-upload-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    background: #f8fafc;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.file-upload-label:hover, .file-upload-label.dragover {
    border-color: var(--primary);
    background: rgba(0, 71, 187, 0.05);
}

.file-upload-icon {
    color: var(--primary);
    margin-bottom: 12px;
}

.file-upload-text {
    font-weight: 600;
    margin-bottom: 6px;
}

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

.file-preview {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    background: #000;
    aspect-ratio: 16/9;
}

.file-preview img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.btn-icon {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(0,0,0,0.6);
    color: white;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-icon:hover {
    background: rgba(0,0,0,0.9);
}

/* Alerts / Loader */
.alert {
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 24px;
    font-weight: 500;
}

.alert-error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.loader {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* Lightbox */
.lightbox {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.lightbox-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 30, 96, 0.9);
    backdrop-filter: blur(8px);
}

.lightbox-container {
    position: relative;
    width: 100%;
    max-width: 1100px;
    background: var(--bg-card);
    border-radius: var(--radius);
    overflow: hidden;
    display: flex;
    max-height: 90vh;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.5);
}

@media(max-width: 800px) {
    .lightbox-container { flex-direction: column; }
}

.lightbox-close {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 10;
    background: rgba(0,0,0,0.15);
    color: #fff;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.lightbox-close:hover { background: rgba(0,0,0,0.3); }

.lightbox-content {
    display: flex;
    width: 100%;
    height: 100%;
}

@media(max-width: 800px) {
    .lightbox-content { flex-direction: column; }
}

.lightbox-media {
    flex: 1.5;
    background: #0f172a;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 300px;
}

.lightbox-media img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
}

@media(max-width: 800px) {
    .lightbox-media img { max-height: 50vh; }
}

.lightbox-sidebar {
    flex: 1;
    padding: 32px;
    display: flex;
    flex-direction: column;
    max-height: 90vh;
    overflow-y: auto;
}

.lightbox-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

.author-avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: 700;
    font-family: var(--font-head);
}

.author-info h4 { margin-bottom: 4px; font-size: 1.15rem; color: var(--text-main); }
.lightbox-date { color: var(--text-muted); font-size: 0.9rem; }

.lightbox-caption {
    font-size: 1.05rem;
    line-height: 1.7;
    margin-bottom: 30px;
    color: var(--text-main);
    flex: 1;
}

.lightbox-actions {
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

.lightbox-comments {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

#btn-lightbox-vote {
    padding: 16px;
    font-size: 1.1rem;
}

/* Success / Share States */
.success-header {
    text-align: center;
    margin-bottom: 30px;
}

.success-icon {
    width: 72px;
    height: 72px;
    background: #10b981;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    margin: 0 auto 20px;
}

.my-submission {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px;
    background: #f8fafc;
    border-radius: var(--radius);
    margin-bottom: 24px;
    border: 1px solid var(--border);
}

.my-submission img {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    object-fit: cover;
}

.my-submission-content p {
    font-weight: 500;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.share-panel {
    background: rgba(0, 71, 187, 0.05);
    border: 1px solid rgba(0, 71, 187, 0.1);
    border-radius: var(--radius);
    padding: 24px;
    text-align: center;
    margin-bottom: 24px;
}

.share-panel h3 { color: var(--primary-dark); margin-bottom: 8px; font-family: var(--font-head); }
.share-panel p { margin-bottom: 16px; color: var(--text-main); }
.share-controls { display: flex; gap: 8px; }

.share-controls input {
    flex: 1;
    background: #fff;
}

/* Toasts */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.toast {
    background: #1e293b;
    color: #fff;
    padding: 14px 24px;
    border-radius: 8px;
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1);
    font-weight: 500;
    transition: all 0.3s ease;
}

#wbx-powered-by-slot { margin-top: 50px; margin-bottom: 20px; }
