:root {
    --primary: #d946ef; /* Fuchsia/Pink */
    --primary-hover: #c026d3;
    --secondary: #ec4899;
    --accent: #10b981; /* Soft green */
    
    --bg-color: #fdf2f8;
    --surface: #ffffff;
    --text-main: #1f2937;
    --text-muted: #6b7280;
    --border: #f3f4f6;
    
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Inter', sans-serif;
    
    --radius-lg: 24px;
    --radius-md: 12px;
    --radius-sm: 8px;
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-glow: 0 0 20px rgba(217, 70, 239, 0.2);
}

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

body {
    font-family: var(--font-body);
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow-x: hidden;
}

/* Background decorations */
.background-decor {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    z-index: -1;
    opacity: 0.6;
}
.blob-1 { top: -10%; left: -10%; width: 500px; height: 500px; background: rgba(24bc, 207, 232, 0.4); }
.blob-2 { bottom: 10%; right: -5%; width: 400px; height: 400px; background: rgba(216, 180, 254, 0.3); }

.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border-width: 0; }

.page-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 0 20px 40px;
}

/* Hero Section */
.hero {
    text-align: center;
    margin: 40px 0;
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md);
}

.hero-image {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-size: cover;
    background-position: center;
    z-index: 1;
}

.hero-image::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(to right, rgba(253, 242, 248, 0.95), rgba(253, 242, 248, 0.7));
}

.hero-content {
    position: relative;
    z-index: 2;
    padding: 60px 40px;
    max-width: 800px;
}

.badge {
    display: inline-block;
    padding: 6px 16px;
    background: rgba(217, 70, 239, 0.1);
    color: var(--primary);
    border: 1px solid rgba(217, 70, 239, 0.3);
    border-radius: 99px;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 20px;
}

.hero h1 {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    line-height: 1.1;
    margin-bottom: 20px;
    color: #111827;
}

.hero h1 span {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero p {
    font-size: 1.125rem;
    color: #4b5563;
    max-width: 600px;
    margin: 0 auto;
}

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

/* Tabs */
.tabs {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 30px;
}

.tab-btn {
    padding: 14px 32px;
    font-family: inherit;
    font-size: 1.05rem;
    font-weight: 600;
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
}

.tab-btn:hover { color: var(--primary); }

.tab-btn.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.tab-content-container {
    width: 100%;
}

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

.form-card h2, .success-card h2 {
    font-family: var(--font-heading);
    font-size: 2rem;
    margin-bottom: 8px;
    text-align: center;
}

.subtitle {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 30px;
}

.form-group { margin-bottom: 20px; }
.form-row { display: flex; gap: 20px; }
.form-row .form-group { flex: 1; }

label {
    display: block;
    font-weight: 500;
    margin-bottom: 8px;
    color: #374151;
    font-size: 0.95rem;
}

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

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

/* File Upload Area */
.photo-upload-label {
    display: block;
    border: 2px dashed #d1d5db;
    border-radius: var(--radius-md);
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #f9fafb;
}

.photo-upload-label:hover, .photo-upload-label.dragover {
    border-color: var(--primary);
    background: rgba(217, 70, 239, 0.02);
}

.upload-placeholder svg {
    color: #9ca3af;
    margin-bottom: 12px;
}

.upload-placeholder span {
    display: block;
    font-weight: 500;
    color: var(--text-main);
}

.upload-placeholder .small-text {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 4px;
    font-weight: 400;
}

.upload-preview {
    position: relative;
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.upload-preview img {
    max-width: 100%;
    max-height: 300px;
    border-radius: var(--radius-sm);
    display: block;
    margin: 0 auto;
}

.change-photo-btn {
    position: absolute;
    top: 10px; right: 10px;
    background: rgba(0,0,0,0.6);
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    cursor: pointer;
    backdrop-filter: blur(4px);
}

.submit-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 1.125rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-md);
    margin-top: 30px;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

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

.error-message {
    background: #fee2e2;
    color: #b91c1c;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    margin-top: 20px;
    font-size: 0.95rem;
    border-left: 4px solid #ef4444;
}

/* Post Entry View */
.success-icon {
    width: 80px; height: 80px;
    background: #d1fae5;
    color: #10b981;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 20px;
}

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

.user-entry-preview {
    margin: 30px 0;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
}

.user-entry-preview img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
}

.user-entry-caption {
    padding: 16px;
    background: #f9fafb;
    font-style: italic;
    color: #4b5563;
    border-top: 1px solid var(--border);
}

.share-panel {
    background: #fdf4ff;
    border: 1px solid #fae8ff;
    padding: 24px;
    border-radius: var(--radius-md);
    margin-bottom: 30px;
    text-align: left;
}

.share-panel h3 { color: var(--primary); margin-bottom: 8px; font-size: 1.1rem; }
.share-panel p { font-size: 0.9rem; margin-bottom: 16px; color: #4b5563; }

.share-url-container {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
}

.share-url-container input {
    margin: 0;
    background: white;
}

.secondary-btn, .primary-btn, .view-gallery-action-btn {
    padding: 12px 24px;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
    border: none;
}

.secondary-btn {
    background: #e5e7eb;
    color: #374151;
}

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

.primary-btn {
    background: var(--primary);
    color: white;
}

.primary-btn:hover { background: var(--primary-hover); }

.view-gallery-action-btn {
    width: 100%;
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.view-gallery-action-btn:hover {
    background: rgba(217, 70, 239, 0.05);
}

.social-share-buttons {
    display: flex;
    gap: 10px;
}

.social-btn {
    flex: 1;
    padding: 10px;
    text-align: center;
    border-radius: var(--radius-sm);
    color: white;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: opacity 0.2s;
}

.social-btn:hover { opacity: 0.9; }
.social-btn.fb { background: #1877F2; }
.social-btn.tw { background: #000000; }

/* Gallery Section */
.gallery-header {
    text-align: center;
    margin-bottom: 30px;
}

.gallery-header h2 {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    color: #111827;
}

.gallery-header p { color: var(--text-muted); font-size: 1.1rem; }

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

.gallery-card {
    background: var(--surface);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

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

.card-image-wrap {
    position: relative;
    padding-top: 100%; /* 1:1 aspect ratio */
    overflow: hidden;
    background: #f3f4f6;
}

.card-img {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    object-fit: cover;
}

.card-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-card:hover .card-overlay { opacity: 1; }

.view-btn {
    background: white;
    color: #111827;
    border: none;
    padding: 8px 16px;
    border-radius: 99px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

.gallery-card:hover .view-btn { transform: translateY(0); }

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

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

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

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

/* Vote Buttons */
.vote-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: transparent;
    border: 1px solid #e5e7eb;
    border-radius: 99px;
    cursor: pointer;
    transition: all 0.2s;
    color: #4b5563;
    font-family: inherit;
    font-weight: 500;
}

.vote-btn.small { padding: 4px 10px; font-size: 0.85rem; }
.vote-btn.large { padding: 10px 24px; font-size: 1.1rem; }

.vote-btn:hover:not(:disabled) {
    border-color: #fca5a5;
    background: #fef2f2;
    color: #ef4444;
}

.vote-btn .heart-icon { transition: transform 0.2s; }
.vote-btn:hover:not(:disabled) .heart-icon { transform: scale(1.1); fill: #fecaca; }

.vote-btn.voted {
    border-color: #ef4444;
    background: #ef4444;
    color: white;
    cursor: default;
}
.vote-btn.voted .heart-icon { fill: white; }

.gallery-footer {
    text-align: center;
    margin-top: 20px;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.empty-state svg { color: #d1d5db; margin-bottom: 16px; }
.empty-state h3 { font-size: 1.5rem; margin-bottom: 8px; }
.empty-state p { color: var(--text-muted); margin-bottom: 24px; }

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

.lightbox-backdrop {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.85);
    backdrop-filter: blur(4px);
}

.lightbox-content {
    position: relative;
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    max-width: 1000px;
    width: 100%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    z-index: 1001;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.5);
}

.lightbox-close {
    position: absolute;
    top: 16px; right: 16px;
    background: rgba(0,0,0,0.5);
    color: white;
    border: none;
    width: 36px; height: 36px;
    border-radius: 50%;
    font-size: 1.5rem;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: background 0.2s;
}

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

.lightbox-image-container {
    background: #111827;
    flex: 1;
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.lightbox-image-container img {
    max-width: 100%;
    max-height: 60vh;
    object-fit: contain;
}

.lightbox-details {
    padding: 24px;
    background: white;
}

.lightbox-author-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    font-weight: 500;
    color: #4b5563;
}

.author-avatar {
    width: 32px; height: 32px;
    background: #f3f4f6;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: #9ca3af;
}

.lightbox-caption {
    font-size: 1.1rem;
    color: #111827;
    margin-bottom: 24px;
    line-height: 1.5;
}

.lightbox-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.lightbox-share {
    display: flex;
    align-items: center;
    gap: 8px;
}

.share-label {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-right: 4px;
}

.icon-btn {
    background: #f3f4f6;
    border: none;
    width: 36px; height: 36px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: #4b5563;
    cursor: pointer;
    transition: all 0.2s;
}

.icon-btn:hover { background: #e5e7eb; color: #111827; }

/* Loading Spinner */
.loading-spinner {
    width: 40px; height: 40px;
    border: 3px solid rgba(217, 70, 239, 0.2);
    border-radius: 50%;
    border-top-color: var(--primary);
    animation: spin 1s ease-in-out infinite;
    margin: 0 auto;
}

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

#wbx-powered-by-slot { margin-top: 40px; }

@media (min-width: 768px) {
    .lightbox-content { flex-direction: row; height: 80vh; }
    .lightbox-image-container { flex: 2; height: 100%; }
    .lightbox-image-container img { max-height: 100%; }
    .lightbox-details { flex: 1; max-width: 400px; display: flex; flex-direction: column; overflow-y: auto; }
    .lightbox-caption { flex: 1; }
    .lightbox-actions { flex-direction: column; align-items: flex-start; }
    .lightbox-share { width: 100%; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border); }
}

@media (max-width: 767px) {
    .form-row { flex-direction: column; gap: 0; }
    .hero { margin: 20px 0; border-radius: var(--radius-md); }
    .hero h1 { font-size: 2.5rem; }
    .hero-content { padding: 40px 20px; }
}
