/* Public/Mobile Styles */

.public-container {
    max-width: 480px;
    margin: 0 auto;
    padding: 1.5rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.public-header {
    text-align: center;
    padding: 1rem 0 0.5rem;
}

.header-logo {
    max-width: 120px;
    height: auto;
    margin: 0 auto;
    display: block;
}

.public-logo {
    width: 80px;
    height: 80px;
    margin-bottom: 1rem;
}

.public-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* No Event State */
.no-event {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem;
}

.no-event-icon {
    width: 120px;
    height: 120px;
    background: var(--dark-secondary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.no-event-icon i {
    font-size: 3rem;
    color: var(--gray);
}

.no-event h2 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.no-event p {
    color: var(--gray);
}

/* Event Info Section */
.event-section {
    background: var(--dark-secondary);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--dark-tertiary);
}

.event-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.event-description {
    color: var(--gray);
    font-size: 0.875rem;
    line-height: 1.6;
}

/* Prizes Preview */
.prizes-section {
    margin-bottom: 1.5rem;
}

.prizes-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.prizes-title i {
    color: var(--warning);
}

.prizes-scroll {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    scrollbar-width: thin;
}

.prize-preview {
    flex-shrink: 0;
    width: 140px;
    background: var(--dark-secondary);
    border-radius: var(--border-radius);
    overflow: hidden;
    border: 1px solid var(--dark-tertiary);
}

.prize-preview-image {
    width: 100%;
    height: 100px;
    object-fit: cover;
    background: var(--dark-tertiary);
}

.prize-preview-name {
    padding: 0.75rem;
    font-size: 0.75rem;
    font-weight: 500;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Registration Form */
.form-section {
    background: var(--dark-secondary);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--dark-tertiary);
}

.form-section-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Consent Checkbox */
.consent-group {
    margin-top: 1.25rem;
    margin-bottom: 0.5rem;
}

.consent-label {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    cursor: pointer;
    font-size: 0.85rem;
    line-height: 1.4;
    color: var(--gray);
}

.consent-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    min-width: 18px;
    margin-top: 2px;
    accent-color: var(--primary);
    cursor: pointer;
}

.consent-text {
    flex: 1;
}

/* Verification Section */
.verification-section {
    text-align: center;
    padding: 2rem;
}

.verification-group {
    background: var(--dark);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--dark-tertiary);
}

.verification-group h4 {
    font-size: 0.9rem;
    margin-bottom: 1rem;
    color: var(--gray);
}

.verification-block {
    background: var(--dark);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--dark-tertiary);
}

.verification-block h4 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.verification-icon {
    width: 80px;
    height: 80px;
    background: rgba(176, 79, 50, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.verification-icon i {
    font-size: 2rem;
    color: var(--primary);
}

.code-input-group {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    margin: 1rem 0;
    flex-wrap: wrap;
}

.code-input {
    width: 40px;
    height: 48px;
    text-align: center;
    font-size: 1.25rem;
    font-weight: 700;
    border: 2px solid var(--dark-tertiary);
    border-radius: 10px;
    background: var(--dark);
    color: var(--light);
    transition: var(--transition);
    flex-shrink: 0;
}

.code-input:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(176, 79, 50, 0.2);
}

.code-input:not(:placeholder-shown) {
    border-color: var(--primary);
}

.resend-link {
    color: var(--primary);
    text-decoration: none;
    font-size: 0.875rem;
    cursor: pointer;
}

.resend-link:hover {
    text-decoration: underline;
}

.resend-link.disabled {
    color: var(--gray);
    cursor: not-allowed;
}

.resend-link.disabled:hover {
    text-decoration: none;
}

/* Wheel Section - see bottom of file for updated styles */

#wheel-canvas {
    border-radius: 50%;
    box-shadow: 0 0 20px rgba(176, 79, 50, 0.3);
}

.wheel {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    position: relative;
    transition: transform 5s cubic-bezier(0.17, 0.67, 0.12, 0.99);
    box-shadow: 0 0 30px rgba(176, 79, 50, 0.3);
}

.wheel-pointer {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 15px solid transparent;
    border-right: 15px solid transparent;
    border-top: 25px solid #b04f32;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
    z-index: 10;
}

.wheel-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #b04f32 0%, #8a3d27 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    z-index: 5;
    border: 3px solid #1e1e2e;
}

.wheel-center i {
    font-size: 1.25rem;
    color: var(--white);
}

.spin-button {
    width: 200px;
    height: 55px;
    font-size: 1.1rem;
    font-weight: 600;
    margin-top: 1rem;
}

/* Result Modal */
.result-content {
    text-align: center;
    padding: 2rem 1rem;
}

.result-icon {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.result-icon.win {
    background: rgba(16, 185, 129, 0.2);
}

.result-icon.win i {
    font-size: 3rem;
    color: var(--secondary);
}

.result-icon.lose {
    background: rgba(107, 114, 128, 0.2);
}

.result-icon.lose i {
    font-size: 3rem;
    color: var(--gray);
}

.result-icon.already-played {
    background: rgba(176, 79, 50, 0.2);
}

.result-icon.already-played i {
    font-size: 3rem;
    color: var(--primary);
}

.result-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.result-prize {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.result-prize-image {
    width: 150px;
    height: 150px;
    object-fit: contain;
    margin: 1rem auto;
    border-radius: var(--border-radius);
}

.result-prize-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
    margin-top: 0.5rem;
}

/* Steps Indicator */
.steps {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.step {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--dark-tertiary);
    transition: var(--transition);
}

.step.active {
    background: var(--primary);
    width: 32px;
    border-radius: 6px;
}

.step.completed {
    background: var(--secondary);
}

/* Animations */
@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.pulse {
    animation: pulse 2s infinite;
}

@keyframes confetti {
    0% { transform: translateY(0) rotate(0deg); opacity: 1; }
    100% { transform: translateY(100vh) rotate(720deg); opacity: 0; }
}

.confetti {
    position: fixed;
    width: 10px;
    height: 10px;
    animation: confetti 3s ease-in-out forwards;
}

/* Already Played Section */
.already-played-section {
    text-align: center;
    padding: 2rem;
}

.already-played-icon {
    width: 100px;
    height: 100px;
    background: rgba(176, 79, 50, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.already-played-icon i {
    font-size: 3rem;
    color: var(--primary);
}

/* Language Toggle */
.lang-toggle {
    position: fixed;
    top: 10px;
    right: 10px;
    background: var(--dark-secondary);
    border: 1px solid var(--dark-tertiary);
    border-radius: 20px;
    padding: 0.25rem;
    display: flex;
    gap: 0.25rem;
    z-index: 100;
}

.lang-btn {
    background: transparent;
    border: none;
    color: var(--gray);
    padding: 0.25rem 0.75rem;
    border-radius: 16px;
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: 600;
    transition: var(--transition);
}

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

.lang-btn:hover:not(.active) {
    color: var(--light);
}

/* Prize Grid */
.prizes-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    margin-top: 1rem;
}

.prize-card {
    background: var(--dark-secondary);
    border-radius: var(--border-radius);
    overflow: hidden;
    border: 1px solid var(--dark-tertiary);
    transition: var(--transition);
    cursor: pointer;
}

.prize-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
}

.prize-card-image {
    width: 100%;
    height: 70px;
    object-fit: cover;
    background: var(--dark-tertiary);
}

.prize-card-content {
    padding: 0.5rem;
}

.prize-card-name {
    font-size: 0.7rem;
    font-weight: 600;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.prize-card-desc {
    font-size: 0.75rem;
    color: var(--gray);
    margin-bottom: 0.25rem;
    line-height: 1.4;
}

.prize-card-qty {
    font-size: 0.7rem;
    color: var(--gray);
}

.prize-card-info {
    padding: 0.75rem;
}

/* Resend Timer */
.resend-timer {
    color: var(--gray);
    font-size: 0.85rem;
}

.resend-timer.active {
    color: var(--primary);
    cursor: pointer;
}

.resend-timer.active:hover {
    text-decoration: underline;
}

/* Prizes Page with Sticky Button */
.prizes-page {
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - 100px);
}

.prizes-page-content {
    flex: 1;
    padding-bottom: 80px;
}

.sticky-bottom {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1rem;
    background: linear-gradient(to top, var(--dark) 80%, transparent);
    z-index: 50;
}

.sticky-bottom .btn {
    max-width: 480px;
    margin: 0 auto;
    display: block;
}

/* Lightbox */
.lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1rem;
}

.lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    text-align: center;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 70vh;
    border-radius: var(--border-radius);
}

.lightbox-close {
    position: absolute;
    top: -40px;
    right: 0;
    background: transparent;
    border: none;
    color: var(--white);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
}

.lightbox-caption {
    margin-top: 1rem;
    color: var(--light);
    font-size: 1rem;
    font-weight: 600;
}

/* Prize Preview Slider under wheel */
.prize-preview-container {
    width: 100%;
    max-width: 280px;
    margin: 1rem auto;
    overflow: hidden;
}

.prize-preview-slider {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.prize-preview-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.5rem;
    border-radius: var(--border-radius);
    background: var(--dark-secondary);
    border: 2px solid transparent;
    transition: all 0.3s ease;
    opacity: 0.4;
    transform: scale(0.9);
    width: 80px;
}

.prize-preview-item.active {
    opacity: 1;
    transform: scale(1);
    border-color: var(--primary);
    background: rgba(176, 79, 50, 0.2);
}

.prize-preview-item img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 8px;
}

.prize-preview-item span {
    font-size: 0.65rem;
    margin-top: 0.25rem;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 70px;
}

.prize-preview-placeholder {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--dark-tertiary);
    border-radius: 8px;
    color: var(--gray);
}

/* Prize Marquee - Horizontal Scrolling */
.prize-marquee-container {
    width: 100%;
    overflow: hidden;
    margin: 1rem 0;
    padding: 0.5rem 0;
    background: linear-gradient(90deg, var(--dark) 0%, transparent 10%, transparent 90%, var(--dark) 100%);
}

.prize-marquee {
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.prize-marquee::-webkit-scrollbar {
    display: none;
}

.prize-marquee-track {
    display: flex;
    gap: 1rem;
    width: max-content;
    padding: 0.5rem 1rem;
}

.prize-marquee-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.5rem;
    border-radius: var(--border-radius);
    background: var(--dark-secondary);
    border: 2px solid var(--dark-tertiary);
    min-width: 80px;
    transition: all 0.15s ease;
    opacity: 0.6;
    transform: scale(0.9);
}

.prize-marquee-item.active {
    border-color: var(--primary);
    box-shadow: 0 0 20px rgba(176, 79, 50, 0.8);
    animation: glow 0.5s ease-in-out infinite alternate;
    opacity: 1;
    transform: scale(1.15);
    z-index: 10;
}

.prize-marquee-item.winner {
    border-color: #10b981;
    box-shadow: 0 0 30px rgba(16, 185, 129, 0.9);
    animation: winnerGlow 0.3s ease-in-out infinite alternate;
    opacity: 1;
    transform: scale(1.25);
    z-index: 20;
}

.prize-marquee-item img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 8px;
}

.prize-marquee-item span {
    font-size: 0.65rem;
    margin-top: 0.25rem;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 70px;
    color: var(--white);
}

.prize-marquee-placeholder {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--dark-tertiary);
    border-radius: 8px;
    color: var(--primary);
}

@keyframes marquee {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-33.333%);
    }
}

@keyframes glow {
    0% {
        box-shadow: 0 0 10px rgba(176, 79, 50, 0.5);
    }
    100% {
        box-shadow: 0 0 25px rgba(176, 79, 50, 1);
    }
}

@keyframes winnerGlow {
    0% {
        box-shadow: 0 0 20px rgba(16, 185, 129, 0.7);
    }
    100% {
        box-shadow: 0 0 40px rgba(16, 185, 129, 1);
    }
}

/* Fixed Spin Button */
.spin-button-fixed {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1rem;
    background: linear-gradient(to top, var(--dark) 0%, var(--dark) 80%, transparent 100%);
    display: flex;
    justify-content: center;
    z-index: 100;
}

.spin-button-fixed .spin-button {
    width: 200px;
    height: 55px;
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
}

/* Adjust wheel section for fixed button */
.wheel-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 1rem 0;
    padding-bottom: 90px; /* Space for fixed button */
}

/* Wheel container - allow touch/drag */
.wheel-container {
    position: relative;
    width: 280px;
    height: 280px;
    margin-bottom: 1rem;
    cursor: grab;
    touch-action: none;
}

.wheel-container:active {
    cursor: grabbing;
}
