:root {
    --primary: #4ade80; /* Vibrant green */
    --primary-dark: #22c55e;
    --secondary: #facc15; /* Warm yellow */
    --secondary-dark: #eab308;
    --text-main: #1f2937;
    --text-muted: #4b5563;
    --bg-page: #f0fdf4;
    --bg-card: rgba(255, 255, 255, 0.95);
    --border-color: rgba(74, 222, 128, 0.2);
    --error: #ef4444;
    --radius: 16px;
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 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 {
    font-family: 'Inter', sans-serif;
    color: var(--text-main);
    background-color: var(--bg-page);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, .badge {
    font-family: 'Poppins', sans-serif;
}

.hidden {
    display: none !important;
}

/* Layout */
.page-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Hero Section */
.hero {
    position: relative;
    padding: 80px 20px;
    min-height: 40vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
}

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

.hero-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(to bottom, rgba(20, 83, 45, 0.6), rgba(20, 83, 45, 0.8));
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    color: white;
}

.badge {
    display: inline-block;
    background: var(--secondary);
    color: #422006;
    padding: 6px 16px;
    border-radius: 999px;
    font-size: 0.875rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 20px;
    box-shadow: 0 4px 14px rgba(250, 204, 21, 0.4);
}

.hero h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    line-height: 1.1;
    font-weight: 800;
    margin-bottom: 20px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.hero p {
    font-size: 1.125rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

.hero-link {
    color: var(--secondary);
    font-weight: 600;
    text-decoration: underline;
    transition: color 0.2s ease;
}

.hero-link:hover {
    color: white;
}

/* Countdown Timer */
.countdown-wrapper {
    margin-top: 30px;
    padding: 20px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: var(--radius);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: inline-block;
}

.countdown-wrapper h3 {
    font-size: 1rem;
    color: var(--secondary);
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

.countdown-timer {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.time-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(255, 255, 255, 0.1);
    padding: 10px 15px;
    border-radius: 8px;
    min-width: 70px;
}

.time-block span {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1;
    font-family: 'Poppins', sans-serif;
    color: white;
}

.time-block small {
    font-size: 0.75rem;
    text-transform: uppercase;
    margin-top: 5px;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
}

.ended-message {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--error);
}

/* Main Container */
.main-container {
    flex: 1;
    max-width: 1100px;
    width: 100%;
    margin: -40px auto 40px;
    padding: 0 20px;
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* Content Grid (Side by side on desktop) */
.content-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    align-items: start;
}

@media (min-width: 860px) {
    .content-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* Cards */
.card {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 40px;
    box-shadow: var(--shadow-lg);
}

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

.card-header.text-left {
    text-align: left;
}

.card-header h2, .card-header h3 {
    font-size: 2rem;
    color: #166534;
    margin-bottom: 10px;
}

/* Prize Card Styles */
.prize-card {
    background: linear-gradient(to bottom right, #ffffff, #f0fdf4);
}

.prize-img {
    width: 100%;
    border-radius: 12px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
    object-fit: cover;
    aspect-ratio: 4/3;
    border: 1px solid rgba(0,0,0,0.05);
}

.prize-desc {
    white-space: pre-wrap;
    font-size: 1.05rem;
    line-height: 1.7;
    color: #374151;
}

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

label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #374151;
}

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

input[type="text"]:focus,
input[type="email"]:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(74, 222, 128, 0.2);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    border-radius: 12px;
    font-family: inherit;
    font-size: 1.125rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn-block {
    width: 100%;
}

.btn-primary {
    background: var(--primary);
    color: #064e3b;
    box-shadow: 0 4px 14px rgba(74, 222, 128, 0.4);
}

.btn-primary:hover:not(:disabled) {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(74, 222, 128, 0.5);
}

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

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

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

.text-link {
    background: none;
    border: none;
    color: #166534;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: underline;
    cursor: pointer;
    font-family: inherit;
}

.form-footer {
    margin-top: 24px;
    text-align: center;
}

/* Error Messages */
.error-message {
    background: #fef2f2;
    color: var(--error);
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    border: 1px solid #fecaca;
}

/* Post Entry Success */
.success-header {
    text-align: center;
    padding: 40px;
    margin-bottom: 30px;
    background: linear-gradient(135deg, #dcfce7, #f0fdf4);
    border-color: var(--primary);
}

.success-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.success-header h2 {
    color: #166534;
    font-size: 2.5rem;
    margin-bottom: 10px;
}

/* Bonus Tasks Grid */
.section-title {
    font-size: 1.75rem;
    color: #166534;
    text-align: center;
    margin-bottom: 24px;
}

.tasks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.task-card {
    background: white;
    border-radius: var(--radius);
    padding: 30px 20px;
    text-align: center;
    border: 1px solid #e5e7eb;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease;
}

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

.task-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.task-card h4 {
    font-size: 1.25rem;
    margin-bottom: 10px;
    color: #111827;
}

.task-card p {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 20px;
    flex-grow: 1;
}

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

.share-input-group input {
    flex: 1;
    padding: 10px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 0.85rem;
    background: #f9fafb;
}

.share-input-group .btn {
    padding: 10px 16px;
    font-size: 0.9rem;
    border-radius: 8px;
}

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

.social-btn {
    flex: 1;
    display: inline-block;
    padding: 10px;
    border-radius: 8px;
    color: white;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
}

.social-btn.fb { background: #1877f2; }
.social-btn.tw { background: #1da1f2; }

.task-status {
    color: #16a34a !important;
    font-weight: 600;
    margin-top: 15px !important;
    margin-bottom: 0 !important;
    padding: 10px;
    background: #dcfce7;
    border-radius: 8px;
}

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

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

.modal-content {
    position: relative;
    background: white;
    width: 100%;
    max-width: 600px;
    max-height: 85vh;
    border-radius: var(--radius);
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-lg);
    z-index: 1001;
}

.modal-header {
    padding: 20px 30px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    font-size: 1.5rem;
    color: #111827;
}

.close-modal {
    background: none;
    border: none;
    font-size: 2rem;
    line-height: 1;
    color: #9ca3af;
    cursor: pointer;
    transition: color 0.2s;
}

.close-modal:hover {
    color: #111827;
}

.modal-body {
    padding: 30px;
    overflow-y: auto;
    white-space: pre-wrap;
    font-size: 0.95rem;
    color: #4b5563;
}

/* Status Banner */
.status-banner {
    background: white;
    border-radius: var(--radius);
    padding: 40px;
    text-align: center;
    box-shadow: var(--shadow-md);
}

.status-banner h2 {
    color: #1f2937;
    margin-bottom: 10px;
}

/* Powered By */
#wbx-powered-by-slot {
    margin-top: auto;
    padding: 20px 0;
    width: 100%;
}

/* Responsive */
@media (max-width: 768px) {
    .hero {
        padding: 60px 20px 40px;
    }
    .hero h1 {
        font-size: 2.25rem;
    }
    .card {
        padding: 25px 20px;
    }
    .main-container {
        margin-top: -20px;
    }
    .countdown-timer {
        gap: 8px;
    }
    .time-block {
        min-width: 60px;
        padding: 8px 10px;
    }
    .time-block span {
        font-size: 1.5rem;
    }
}
