:root {
    --c-yellow: #fde047;
    --c-pink: #fb7185;
    --c-blue: #38bdf8;
    --c-cream: #fffaf0;
    --c-text: #1f2937;
    --c-text-light: #4b5563;
    --c-border: rgba(31, 41, 55, 0.1);
    
    --font-heading: 'Fredoka', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    --shadow-sm: 0 4px 6px -1px rgba(0,0,0,0.05), 0 2px 4px -1px rgba(0,0,0,0.03);
    --shadow-md: 0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -2px rgba(0,0,0,0.04);
    --shadow-hover: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);
}

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

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

.hidden {
    display: none !important;
}

/* Decorative Background */
.paw-bg {
    position: absolute;
    width: 120px;
    height: 120px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23fde047' opacity='0.4'%3E%3Cpath d='M12,2c-2.21,0-4,1.79-4,4s1.79,4,4,4s4-1.79,4-4S14.21,2,12,2z M6,6C3.79,6,2,7.79,2,10s1.79,4,4,4s4-1.79,4-4 S8.21,6,6,6z M18,6c-2.21,0-4,1.79-4,4s1.79,4,4,4s4-1.79,4-4S20.21,6,18,6z M12,12c-3.31,0-6,2.69-6,6v2c0,1.1,0.9,2,2,2h8 c1.1,0,2-0.9,2-2v-2C18,14.69,15.31,12,12,12z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-size: contain;
    z-index: 0;
    pointer-events: none;
}
.paw-1 { top: -20px; left: -20px; transform: rotate(-20deg) scale(1.5); }
.paw-2 { top: 40%; right: -30px; transform: rotate(45deg); opacity: 0.6; }
.paw-3 { bottom: 10%; left: 5%; transform: rotate(-15deg); fill: var(--c-blue); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%2338bdf8' opacity='0.3'%3E%3Cpath d='M12,2c-2.21,0-4,1.79-4,4s1.79,4,4,4s4-1.79,4-4S14.21,2,12,2z M6,6C3.79,6,2,7.79,2,10s1.79,4,4,4s4-1.79,4-4 S8.21,6,6,6z M18,6c-2.21,0-4,1.79-4,4s1.79,4,4,4s4-1.79,4-4S20.21,6,18,6z M12,12c-3.31,0-6,2.69-6,6v2c0,1.1,0.9,2,2,2h8 c1.1,0,2-0.9,2-2v-2C18,14.69,15.31,12,12,12z'/%3E%3C/svg%3E"); }

.page-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
    position: relative;
    z-index: 1;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

h1, h2, h3, h4, h5 {
    font-family: var(--font-heading);
    line-height: 1.2;
    color: var(--c-text);
}

/* Status Messages */
.status-message {
    text-align: center;
    padding: 6rem 1rem;
    background: #fff;
    border-radius: 24px;
    box-shadow: var(--shadow-md);
    margin-top: 2rem;
}
.status-message h2 {
    font-size: 2.5rem;
    color: var(--c-pink);
    margin-bottom: 1rem;
}

/* Hero Section */
.hero-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    margin-bottom: 5rem;
}
@media (max-width: 900px) {
    .hero-section {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

.hero-text-col {
    padding: 1rem 0;
}
.badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: var(--c-yellow);
    color: var(--c-text);
    font-weight: 600;
    font-size: 0.875rem;
    border-radius: 99px;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.hero-text-col h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    margin-bottom: 1rem;
}
.hero-text-col .subtitle {
    font-size: clamp(1.25rem, 2.5vw, 1.75rem);
    color: var(--c-blue);
    margin-bottom: 1.5rem;
    font-weight: 600;
}
.voting-cta {
    font-size: 1.125rem;
    color: var(--c-text-light);
    margin-bottom: 2rem;
    font-weight: 500;
}
.hero-illustration img {
    width: 100%;
    max-width: 500px;
    height: auto;
    border-radius: 24px;
    box-shadow: var(--shadow-md);
    transform: rotate(-2deg);
    transition: transform 0.3s ease;
}
.hero-illustration img:hover {
    transform: rotate(0deg) scale(1.02);
}

/* Form Panel */
.card {
    background: #ffffff;
    border-radius: 24px;
    padding: 2.5rem;
    box-shadow: var(--shadow-md);
    position: relative;
    border: 4px solid #fff;
    outline: 2px dashed var(--c-yellow);
    outline-offset: -12px;
}
.card-header h3 {
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
    text-align: center;
    color: var(--c-pink);
}

/* Upload Zone */
.upload-zone {
    border: 3px dashed var(--c-blue);
    border-radius: 16px;
    padding: 2rem 1rem;
    text-align: center;
    background: rgba(56, 189, 248, 0.05);
    position: relative;
    transition: all 0.2s ease;
    cursor: pointer;
    margin-bottom: 1.5rem;
}
.upload-zone:hover, .upload-zone.dragover {
    background: rgba(56, 189, 248, 0.15);
    border-color: var(--c-pink);
}
.upload-zone input[type="file"] {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 2;
}
.paw-icon {
    color: var(--c-blue);
    margin-bottom: 0.5rem;
}
.upload-cta {
    display: block;
    font-weight: 600;
    font-size: 1.125rem;
    margin-bottom: 0.25rem;
}
.upload-hint {
    display: block;
    font-size: 0.875rem;
    color: var(--c-text-light);
}

.image-preview-container {
    position: relative;
    width: 100%;
    height: 200px;
    border-radius: 12px;
    overflow: hidden;
    z-index: 3;
}
.image-preview-container img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #f3f4f6;
}
.btn-icon {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0,0,0,0.6);
    color: white;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: background 0.2s;
}
.btn-icon:hover {
    background: var(--c-pink);
}

/* Forms */
.form-group {
    margin-bottom: 1.25rem;
}
label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: var(--c-text);
}
input[type="text"], input[type="email"] {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid var(--c-border);
    border-radius: 12px;
    font-family: var(--font-body);
    font-size: 1rem;
    transition: all 0.2s;
    background: #f9fafb;
}
input[type="text"]:focus, input[type="email"]:focus {
    outline: none;
    border-color: var(--c-pink);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(251, 113, 133, 0.2);
}

/* Buttons */
.btn-primary {
    width: 100%;
    background: var(--c-pink);
    color: white;
    border: none;
    padding: 1rem 1.5rem;
    font-size: 1.125rem;
    font-weight: 600;
    font-family: var(--font-heading);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 0 #e11d48;
    margin-top: 1rem;
    position: relative;
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 0 #e11d48;
}
.btn-primary:active {
    transform: translateY(2px);
    box-shadow: 0 2px 0 #e11d48;
}
.btn-primary:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
    box-shadow: 0 4px 0 #e11d48;
}
.btn-secondary {
    background: white;
    color: var(--c-pink);
    border: 2px solid var(--c-pink);
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    font-family: var(--font-heading);
}
.btn-secondary:hover {
    background: var(--c-pink);
    color: white;
}
.btn-small {
    padding: 0.5rem 1rem;
    font-size: 1rem;
}

.error-msg {
    color: #ef4444;
    font-size: 0.875rem;
    margin-top: -0.5rem;
    margin-bottom: 1rem;
    font-weight: 500;
}

/* Post Entry View */
.success-header {
    text-align: center;
    margin-bottom: 2rem;
}
.check-circle {
    width: 64px;
    height: 64px;
    background: var(--c-yellow);
    color: #854d0e;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    margin: 0 auto 1rem;
    font-weight: bold;
}
.my-entry-preview {
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 2rem;
    border: 4px solid white;
    box-shadow: var(--shadow-sm);
    aspect-ratio: 4/3;
}
.my-entry-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.share-box {
    background: #f9fafb;
    border-radius: 16px;
    padding: 1.5rem;
    text-align: center;
    margin-bottom: 2rem;
}
.share-box h4 {
    margin-bottom: 1rem;
}
.share-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    flex-wrap: wrap;
}
.btn-share {
    padding: 0.5rem 1rem;
    border-radius: 8px;
    border: none;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    font-size: 0.9rem;
    background: #e5e7eb;
    color: #374151;
    transition: background 0.2s;
}
.btn-share:hover { background: #d1d5db; }
.btn-share.fb { background: #1877f2; color: white; }
.btn-share.tw { background: #1da1f2; color: white; }

#scroll-to-gallery { width: 100%; }

/* Gallery Section */
.gallery-section {
    padding-top: 3rem;
    border-top: 2px dashed rgba(251, 113, 133, 0.3);
}
.section-header {
    text-align: center;
    margin-bottom: 3rem;
}
.section-header h2 {
    font-size: 2.5rem;
    color: var(--c-pink);
    margin-bottom: 0.5rem;
}
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    background: white;
    border-radius: 24px;
    box-shadow: var(--shadow-sm);
    border: 2px dashed var(--c-pink);
}
.empty-state h3 {
    font-size: 1.5rem;
    margin: 1rem 0 0.5rem;
}
.empty-state p {
    color: var(--c-text-light);
    margin-bottom: 1.5rem;
}

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

/* Gallery Card (Polaroid Style) */
.gallery-card {
    background: white;
    padding: 1rem;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
    display: flex;
    flex-direction: column;
}
.gallery-card:hover {
    transform: translateY(-5px) rotate(1deg);
    box-shadow: var(--shadow-hover);
}
.card-img-wrap {
    aspect-ratio: 1/1;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 1rem;
    background: #f3f4f6;
}
.card-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}
.gallery-card:hover .card-img-wrap img {
    transform: scale(1.05);
}
.card-info {
    text-align: center;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}
.card-caption {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}
.card-submitter {
    font-size: 0.875rem;
    color: var(--c-text-light);
    margin-bottom: 1rem;
    font-style: italic;
}
.card-vote-row {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 0.5rem;
    border-top: 1px solid #f3f4f6;
}
.vote-tally {
    font-weight: 600;
    color: var(--c-pink);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 4px;
}
.btn-vote-small {
    background: var(--c-blue);
    color: white;
    border: none;
    padding: 0.4rem 0.8rem;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}
.btn-vote-small:hover { background: #0284c7; }
.btn-vote-small:disabled {
    background: #e5e7eb;
    color: #9ca3af;
    cursor: default;
}
.btn-vote-small.voted {
    background: var(--c-yellow);
    color: #854d0e;
}

.load-more-container {
    text-align: center;
}

/* Lightbox */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}
.lightbox-overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(5px);
}
.lightbox-content {
    position: relative;
    background: white;
    border-radius: 24px;
    width: 100%;
    max-width: 1000px;
    max-height: 90vh;
    display: flex;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.5);
}
.lightbox-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(0,0,0,0.1);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}
.lightbox-close:hover { background: rgba(0,0,0,0.2); }

.lightbox-grid {
    display: grid;
    grid-template-columns: 3fr 2fr;
    width: 100%;
}
@media (max-width: 768px) {
    .lightbox-grid {
        grid-template-columns: 1fr;
        overflow-y: auto;
    }
    .lightbox-content {
        max-height: 95vh;
        border-radius: 16px;
    }
}
.lightbox-image-col {
    background: #f8fafc;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 300px;
}
.lightbox-image-col img {
    max-width: 100%;
    max-height: 70vh;
    object-fit: contain;
}
.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: white;
    border: none;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    font-size: 24px;
    box-shadow: var(--shadow-md);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
}
.lightbox-nav:hover { transform: translateY(-50%) scale(1.1); }
.lightbox-nav.prev { left: 1rem; }
.lightbox-nav.next { right: 1rem; }

.lightbox-info-col {
    padding: 3rem 2rem;
    display: flex;
    flex-direction: column;
}
#lb-caption {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}
.lb-author {
    color: var(--c-text-light);
    margin-bottom: 2rem;
    font-size: 1.1rem;
}
.lb-vote-section {
    background: #fef2f2;
    padding: 1.5rem;
    border-radius: 16px;
    margin-bottom: 2rem;
    text-align: center;
    border: 2px dashed var(--c-pink);
}
.vote-count {
    font-size: 1.5rem;
    font-family: var(--font-heading);
    color: var(--c-pink);
    margin-bottom: 1rem;
}
.btn-vote {
    width: 100%;
    background: var(--c-pink);
    color: white;
    border: none;
    padding: 1rem;
    font-size: 1.1rem;
    font-weight: bold;
    border-radius: 12px;
    cursor: pointer;
    transition: background 0.2s;
}
.btn-vote:hover { background: #e11d48; }
.btn-vote:disabled {
    background: #e5e7eb;
    color: #9ca3af;
    cursor: default;
}
.btn-vote.voted {
    background: var(--c-yellow);
    color: #854d0e;
}
.vote-msg {
    margin-top: 0.5rem;
    font-size: 0.9rem;
    color: #059669;
}
.lb-share-section {
    margin-top: auto;
    border-top: 1px solid var(--c-border);
    padding-top: 1.5rem;
}
.lb-share-section h4 {
    margin-bottom: 1rem;
    font-size: 1rem;
}

#wbx-powered-by-slot {
    margin: 3rem auto 0;
    width: 100%;
}
