:root {
    --primary: #e11d48; /* Rose/Magenta */
    --primary-hover: #be123c;
    --primary-light: #ffe4e6;
    --secondary: #0f172a;
    --bg-color: #f8fafc;
    --surface: #ffffff;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --success: #10b981;
    --error: #ef4444;
    --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 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --radius: 12px;
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'DM Sans', sans-serif;
}

* {
    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;
}

.hidden {
    display: none !important;
}

/* --- Typography --- */
h1, h2, h3, h4 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    color: var(--secondary);
}

/* --- Hero Section --- */
.hero {
    position: relative;
    padding: 80px 20px;
    text-align: center;
    background-image: url('https://offertabs.s3.amazonaws.com/offer/kmfs7a/site/media/6a3e97a1a6a411.99707222.png');
    background-size: cover;
    background-position: center;
    background-color: var(--secondary);
    color: white;
}

.hero-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(to bottom, rgba(15, 23, 42, 0.7), rgba(15, 23, 42, 0.9));
    z-index: 1;
}

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

.tag {
    display: inline-block;
    background: rgba(225, 29, 72, 0.2);
    border: 1px solid rgba(225, 29, 72, 0.5);
    color: #fda4af;
    padding: 4px 16px;
    border-radius: 999px;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 20px;
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    margin-bottom: 20px;
    color: white;
}

.hero-subtitle {
    font-size: 1.125rem;
    color: rgba(255, 255, 255, 0.8);
    max-width: 600px;
    margin: 0 auto 30px auto;
}

.countdown {
    display: inline-block;
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(8px);
    padding: 10px 24px;
    border-radius: 8px;
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 600;
    border: 1px solid rgba(255,255,255,0.1);
}

/* --- Main Layout --- */
.main-container {
    flex: 1;
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    padding: 40px 20px;
    display: flex;
    flex-direction: column;
}

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

.tab-btn {
    background: transparent;
    border: none;
    padding: 12px 24px;
    font-family: var(--font-heading);
    font-size: 1.125rem;
    font-weight: 600;
    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);
}

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

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

.card-header h2 {
    font-size: 1.75rem;
    margin-bottom: 8px;
}

.card-header p {
    color: var(--text-muted);
}

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

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

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

label {
    display: block;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--secondary);
    font-size: 0.95rem;
}

input[type="text"],
input[type="email"] {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: var(--bg-color);
}

input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
    background: white;
}

/* File Upload Area */
.file-drop-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    background-color: var(--bg-color);
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.file-drop-area:hover, .file-drop-area.dragover {
    border-color: var(--primary);
    background-color: var(--primary-light);
}

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

.file-msg {
    color: var(--text-muted);
    font-weight: 500;
}

.file-drop-area input[type="file"] {
    display: none;
}

.image-preview {
    position: relative;
    width: 100%;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    background: #000;
}

.image-preview img {
    width: 100%;
    display: block;
    object-fit: contain;
    max-height: 300px;
}

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

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

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: 8px;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    text-decoration: none;
}

.btn-full { width: 100%; }

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

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(225, 29, 72, 0.3);
}

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

.btn-secondary {
    background-color: var(--secondary);
    color: white;
}
.btn-secondary:hover { background-color: #1e293b; }

.btn-outline {
    background-color: transparent;
    color: var(--secondary);
    border: 2px solid var(--border);
}
.btn-outline:hover {
    border-color: var(--secondary);
    background-color: var(--bg-color);
}

/* Alerts */
.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 0.9rem;
    font-weight: 500;
}
.alert-error {
    background-color: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

/* --- Success View --- */
.success-icon {
    color: var(--success);
    margin-bottom: 20px;
}
.success-card h2 { margin-bottom: 10px; }
.success-card p { color: var(--text-muted); margin-bottom: 30px; }

.share-panel {
    background: var(--bg-color);
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 30px;
    border: 1px solid var(--border);
}

.share-panel h3 { font-size: 1.25rem; margin-bottom: 8px; }

.share-input-group {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}
.share-input-group input {
    background: white;
}

.social-shares {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.social-btn {
    padding: 8px 16px;
    border-radius: 6px;
    color: white;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    flex: 1;
}
.social-btn.fb { background: #1877f2; }
.social-btn.tw { background: #000000; }

/* --- Gallery View --- */
.gallery-controls {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 30px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 20px;
}
.gallery-title { font-size: 2rem; margin-bottom: 5px; }
.gallery-subtitle { color: var(--text-muted); }

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

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

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

.gallery-img-wrap {
    aspect-ratio: 1 / 1;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    background: var(--bg-color);
}

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

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

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

.gallery-caption {
    font-weight: 500;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.gallery-meta {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 16px;
    flex: 1;
}

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

.vote-count {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    color: var(--secondary);
}
.vote-count svg { color: var(--primary); }

.btn-vote {
    background: var(--primary-light);
    color: var(--primary);
    border: none;
    padding: 6px 16px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
}
.btn-vote:hover {
    background: var(--primary);
    color: white;
}
.btn-vote.voted {
    background: var(--border);
    color: var(--text-muted);
    cursor: default;
}

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

.empty-state {
    text-align: center;
    padding: 60px 20px;
    background: var(--surface);
    border-radius: var(--radius);
    color: var(--text-muted);
}

/* 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(15, 23, 42, 0.9);
    backdrop-filter: blur(4px);
}
.lightbox-content {
    position: relative;
    background: var(--surface);
    border-radius: var(--radius);
    max-width: 1000px;
    width: 100%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    z-index: 1001;
}
@media (min-width: 768px) {
    .lightbox-content {
        flex-direction: row;
        height: 80vh;
    }
}

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

.lightbox-image-container {
    flex: 1;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    min-height: 300px;
}
.lightbox-image-container img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.lightbox-details {
    width: 100%;
    padding: 24px;
    display: flex;
    flex-direction: column;
    background: var(--surface);
}
@media (min-width: 768px) {
    .lightbox-details {
        width: 350px;
        border-left: 1px solid var(--border);
    }
}

.lightbox-info { flex: 1; margin-bottom: 24px; }
.lightbox-caption {
    font-size: 1.125rem;
    font-weight: 500;
    margin-bottom: 12px;
}
.lightbox-author { color: var(--text-muted); font-size: 0.9rem; }

.lightbox-actions {
    border-top: 1px solid var(--border);
    padding-top: 20px;
}
.lightbox-actions .btn-vote {
    width: 100%;
    padding: 12px;
    font-size: 1rem;
}

/* Utilities */
.loading-spinner {
    display: flex;
    justify-content: center;
    padding: 40px;
}
.spinner {
    animation: rotate 2s linear infinite;
    z-index: 2;
    width: 40px;
    height: 40px;
}
.spinner .path {
    stroke: var(--primary);
    stroke-linecap: round;
    animation: dash 1.5s ease-in-out infinite;
}
@keyframes rotate { 100% { transform: rotate(360deg); } }
@keyframes dash {
    0% { stroke-dasharray: 1, 150; stroke-dashoffset: 0; }
    50% { stroke-dasharray: 90, 150; stroke-dashoffset: -35; }
    100% { stroke-dasharray: 90, 150; stroke-dashoffset: -124; }
}

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