:root {
    --color-ocean: #0c4a6e;
    --color-ocean-dark: #082f49;
    --color-ocean-light: #0f5b87;
    --color-copper: #b8763a;
    --color-rust: #c2410c;
    --color-sand: #f5deb3;
    --color-sand-muted: rgba(245, 222, 179, 0.7);
    
    --font-heading: 'Fraunces', serif;
    --font-body: 'Inter', sans-serif;
    --font-mono: 'Space Mono', monospace;
}

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

body {
    background-color: var(--color-ocean-dark);
    background-image: radial-gradient(circle at top center, var(--color-ocean) 0%, var(--color-ocean-dark) 100%);
    color: #ffffff;
    font-family: var(--font-body);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    position: relative;
}

.hidden {
    display: none !important;
}

/* Background Particles */
.particles-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.particles-bg::before,
.particles-bg::after {
    content: '';
    position: absolute;
    width: 200vw;
    height: 200vh;
    background-image: 
        radial-gradient(2px 2px at 40px 60px, rgba(184, 118, 58, 0.5), transparent),
        radial-gradient(2px 2px at 20px 50px, rgba(245, 222, 179, 0.4), transparent),
        radial-gradient(2px 2px at 30px 100px, rgba(194, 65, 12, 0.6), transparent),
        radial-gradient(2px 2px at 40px 60px, rgba(184, 118, 58, 0.5), transparent),
        radial-gradient(2px 2px at 110px 90px, rgba(245, 222, 179, 0.4), transparent),
        radial-gradient(2px 2px at 190px 150px, rgba(194, 65, 12, 0.6), transparent);
    background-repeat: repeat;
    background-size: 200px 200px;
    animation: drift 100s linear infinite;
    opacity: 0.5;
}
.particles-bg::after {
    animation-direction: reverse;
    animation-duration: 150s;
    opacity: 0.3;
}

@keyframes drift {
    0% { transform: translateY(0) translateX(0); }
    100% { transform: translateY(-1000px) translateX(-500px); }
}

/* Layout */
.site-wrapper {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.site-header {
    padding: 30px 20px;
    text-align: center;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 900;
    letter-spacing: 2px;
    color: var(--color-sand);
    text-transform: uppercase;
}
.logo span {
    font-weight: 400;
    color: var(--color-copper);
}

.layout-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
    flex: 1;
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    width: 100%;
}

@media (min-width: 800px) {
    .layout-container {
        grid-template-columns: 1fr 320px;
        gap: 40px;
        align-items: start;
    }
}

.main-content {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* Card Panels (Glassmorphism) */
.card-panel {
    background: rgba(15, 91, 135, 0.3);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(245, 222, 179, 0.1);
    border-radius: 24px;
    padding: 40px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255,255,255,0.05);
}

@media (max-width: 600px) {
    .card-panel { padding: 30px 20px; }
}

/* Typography */
h1 {
    font-family: var(--font-heading);
    font-size: 3rem;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 15px;
    color: #fff;
}
@media (max-width: 600px) { h1 { font-size: 2.2rem; } }

h2 {
    font-family: var(--font-heading);
    font-size: 2rem;
    color: var(--color-sand);
    margin-bottom: 20px;
}

h3 {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    color: var(--color-sand);
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(245,222,179,0.2);
    padding-bottom: 15px;
}

p {
    font-size: 1.1rem;
    line-height: 1.6;
    color: var(--color-sand-muted);
    margin-bottom: 25px;
}

.content-text {
    text-align: center;
    max-width: 500px;
    margin: 0 auto 30px;
}

/* Hero Image */
.hero-container {
    position: relative;
    width: 200px;
    height: 200px;
    margin: 0 auto 30px;
    animation: float 6s ease-in-out infinite;
}

.hero-crate {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 20px;
    box-shadow: 0 15px 30px rgba(0,0,0,0.5);
    position: relative;
    z-index: 2;
}

.glow-orb {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 150%;
    height: 150%;
    background: radial-gradient(circle, rgba(184, 118, 58, 0.4) 0%, transparent 70%);
    filter: blur(20px);
    z-index: 1;
    animation: pulseGlow 3s ease-in-out infinite alternate;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}
@keyframes pulseGlow {
    0% { opacity: 0.6; transform: translate(-50%, -50%) scale(0.9); }
    100% { opacity: 1; transform: translate(-50%, -50%) scale(1.1); }
}

/* Forms */
.entry-form {
    max-width: 500px;
    margin: 0 auto;
}

.form-row {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}
@media (max-width: 500px) { .form-row { flex-direction: column; } }

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

.form-row .form-group {
    margin-bottom: 0;
}

label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--color-sand);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

input[type="email"],
input[type="text"] {
    width: 100%;
    padding: 14px 16px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(245, 222, 179, 0.2);
    border-radius: 12px;
    color: #fff;
    font-family: var(--font-body);
    font-size: 1.05rem;
    transition: all 0.3s ease;
}

input[type="email"]:focus,
input[type="text"]:focus {
    outline: none;
    border-color: var(--color-copper);
    background: rgba(0, 0, 0, 0.3);
    box-shadow: 0 0 0 3px rgba(184, 118, 58, 0.2);
}

input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

/* Custom Checkbox */
.custom-checkbox {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    position: relative;
    user-select: none;
    margin-bottom: 25px;
}

.custom-checkbox input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    position: relative;
    min-width: 22px;
    height: 22px;
    background-color: rgba(0,0,0,0.2);
    border: 1px solid rgba(245, 222, 179, 0.3);
    border-radius: 6px;
    margin-right: 12px;
    margin-top: 2px;
    transition: all 0.2s ease;
}

.custom-checkbox:hover input ~ .checkmark {
    border-color: var(--color-copper);
}

.custom-checkbox input:checked ~ .checkmark {
    background-color: var(--color-copper);
    border-color: var(--color-copper);
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
    left: 7px;
    top: 3px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.custom-checkbox input:checked ~ .checkmark:after {
    display: block;
}

.label-text {
    font-size: 0.95rem;
    color: var(--color-sand-muted);
    line-height: 1.4;
    text-transform: none;
    letter-spacing: normal;
    padding-top: 2px;
}

/* Buttons */
.btn-primary {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, var(--color-copper), var(--color-rust));
    color: #fff;
    border: none;
    border-radius: 12px;
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 16px rgba(194, 65, 12, 0.3);
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 12px 20px rgba(194, 65, 12, 0.4);
}

.btn-primary:active:not(:disabled) {
    transform: translateY(1px);
}

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

.btn-secondary {
    padding: 12px 20px;
    background: rgba(255,255,255,0.1);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 8px;
    font-family: var(--font-body);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}
.btn-secondary:hover {
    background: rgba(255,255,255,0.2);
}

/* Error Message */
.error-message {
    background: rgba(220, 38, 38, 0.2);
    border: 1px solid rgba(220, 38, 38, 0.4);
    color: #fca5a5;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 0.95rem;
    text-align: center;
}

/* Game Panel */
.chests-container {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 40px;
}
@media (max-width: 600px) {
    .chests-container { flex-direction: column; align-items: center; }
}

.chest-wrapper {
    width: 160px;
    height: 160px;
    position: relative;
    cursor: pointer;
    perspective: 1000px;
}

.chest {
    width: 100%;
    height: 100%;
    background-image: url('https://offertabs.s3.amazonaws.com/offer/5jf7fo/site/media/69f1272d23a170.64770056.jpg');
    background-size: cover;
    background-position: center;
    border-radius: 16px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.4);
    transition: transform 0.3s ease, box-shadow 0.3s ease, filter 0.3s;
}

.chests-container:not(.picked) .chest:hover {
    transform: scale(1.05) translateY(-5px);
    box-shadow: 0 15px 30px rgba(184, 118, 58, 0.4);
    filter: brightness(1.1);
}

.chest.shake {
    animation: chestShake 0.6s cubic-bezier(.36,.07,.19,.97) both;
}

.chest.open {
    background-image: url('https://offertabs.s3.amazonaws.com/offer/5jf7fo/site/media/69f1272908d115.90390799.jpg');
    transform: scale(1.1);
    box-shadow: 0 0 40px rgba(184, 118, 58, 0.6);
}

.chests-container.picked .chest:not(.opening) {
    opacity: 0.5;
    filter: grayscale(0.8);
    transform: scale(0.95);
    cursor: default;
}

@keyframes chestShake {
    10%, 90% { transform: translate3d(-2px, 0, 0) rotate(-2deg); }
    20%, 80% { transform: translate3d(4px, 0, 0) rotate(2deg); }
    30%, 50%, 70% { transform: translate3d(-6px, 0, 0) rotate(-4deg); }
    40%, 60% { transform: translate3d(6px, 0, 0) rotate(4deg); }
}

/* Result Panel */
#result-panel {
    text-align: center;
}

.result-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    background: rgba(184, 118, 58, 0.1);
    border-radius: 50%;
    margin-bottom: 20px;
}

.prize-title {
    font-size: 2.5rem;
    font-family: var(--font-heading);
    background: linear-gradient(135deg, var(--color-sand), var(--color-copper));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 15px;
}

.share-panel {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid rgba(245,222,179,0.2);
}

.share-actions {
    display: flex;
    gap: 10px;
    max-width: 400px;
    margin: 15px auto 0;
}
.share-actions input { margin: 0; }
.share-actions button { white-space: nowrap; }

/* Sidebar */
.winners-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.winners-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: rgba(0,0,0,0.2);
    border-radius: 12px;
    border-left: 3px solid var(--color-copper);
}

.winner-name {
    font-weight: 600;
    color: #fff;
    font-size: 0.95rem;
}

.winner-tier {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--color-sand-muted);
    background: rgba(245, 222, 179, 0.1);
    padding: 4px 8px;
    border-radius: 4px;
}

@keyframes slideInTop {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Footer */
.site-footer {
    padding: 40px 20px;
    text-align: center;
    color: rgba(245, 222, 179, 0.4);
    font-size: 0.85rem;
    margin-top: auto;
}
.site-footer p {
    font-size: 0.85rem;
    color: inherit;
    margin-bottom: 10px;
}

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