/* ===== KEYFRAMES ===== */
@keyframes lw-fadeInScale {
    from { opacity: 0; transform: scale(0.88) translateY(24px); }
    to   { opacity: 1; transform: scale(1)    translateY(0); }
}
@keyframes lw-slideInRight {
    from { transform: translateX(105%); }
    to   { transform: translateX(0); }
}
@keyframes lw-slideOutRight {
    from { transform: translateX(0); }
    to   { transform: translateX(105%); }
}
@keyframes lw-backdropIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}
@keyframes lw-backdropOut {
    from { opacity: 1; }
    to   { opacity: 0; }
}
@keyframes lw-shimmer {
    0%   { background-position: -300% center; }
    100% { background-position:  300% center; }
}
@keyframes lw-pulse-gold {
    0%, 100% { box-shadow: 0 0 18px rgba(232,131,10,0.12), 0 24px 60px rgba(0,0,0,0.20); }
    50%       { box-shadow: 0 0 32px rgba(232,131,10,0.25), 0 24px 60px rgba(0,0,0,0.22); }
}
@keyframes lw-fab-pulse {
    0%, 100% { box-shadow: 0 0 0 0   rgba(232,131,10,0.55), 0 8px 22px rgba(0,0,0,0.40); }
    60%       { box-shadow: 0 0 0 16px rgba(232,131,10,0),   0 8px 22px rgba(0,0,0,0.40); }
}
@keyframes lw-spin-slow {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}
@keyframes lw-wheel-glow {
    0%, 100% { filter: drop-shadow(0 0 10px rgba(232,131,10,0.25)); }
    50%       { filter: drop-shadow(0 0 22px rgba(232,131,10,0.50)); }
}
@keyframes lw-bounce-in {
    0%   { transform: scale(0.2) rotate(-8deg); opacity: 0; }
    55%  { transform: scale(1.07) rotate(2deg); opacity: 1; }
    75%  { transform: scale(0.96) rotate(-1deg); }
    100% { transform: scale(1) rotate(0deg); opacity: 1; }
}
@keyframes lw-code-pulse {
    0%, 100% { box-shadow: 0 2px 12px rgba(232,131,10,0.10); border-color: rgba(232,131,10,0.35); }
    50%       { box-shadow: 0 2px 20px rgba(232,131,10,0.22); border-color: rgba(232,131,10,0.65); }
}
@keyframes lw-float {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(-8px); }
}
@keyframes lw-pointer-glow {
    0%, 100% { filter: drop-shadow(0 2px 4px rgba(232,131,10,0.30)); }
    50%       { filter: drop-shadow(0 2px 10px rgba(232,131,10,0.65)); }
}
@keyframes lw-pointer-pulse {
    0%, 100% { box-shadow: 0 2px 10px rgba(0,0,0,0.22), 0 0 0 2px rgba(255,255,255,0.7); }
    50%       { box-shadow: 0 3px 18px rgba(0,0,0,0.34), 0 0 0 4px rgba(255,255,255,0.4); }
}
@keyframes lw-star-twinkle {
    0%, 100% { opacity: 0.15; }
    50%       { opacity: 0.90; }
}
@keyframes lw-border-glow {
    0%, 100% { opacity: 0.35; }
    50%       { opacity: 1; }
}
@keyframes lw-result-appear {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ===== Hidden utility ===== */
.lw-hidden {
    display: none !important;
}

/* ===== FAB gomb ===== */
.lw-fab {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 9990;
    background: linear-gradient(135deg, #f0991e 0%, #c46a06 100%);
    color: #fff;
    border: none;
    border-radius: 999px;
    padding: 13px 20px;
    cursor: pointer;
    font-weight: 800;
    font-size: 14px;
    letter-spacing: 0.4px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    animation: lw-fab-pulse 2.2s ease-in-out infinite;
    transition: transform 0.2s ease, filter 0.2s ease;
    border: 1px solid rgba(255,255,255,0.15);
}
.lw-fab:hover {
    transform: scale(1.07) translateY(-2px);
    filter: brightness(1.12);
}
.lw-fab i {
    font-size: 17px;
    animation: lw-spin-slow 7s linear infinite;
}

/* ===== Modal (drawer container) ===== */
.lw-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    pointer-events: none;
}

/* ===== Backdrop — enyhe sötétítés, az oldal látszik mögötte ===== */
.lw-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.22);
    pointer-events: all;
    animation: lw-backdropIn 0.3s ease both;
}
.lw-backdrop::before { content: none; }
.lw-backdrop::after  { content: none; }

/* ===== Drawer (jobbról becsúszó panel) ===== */
.lw-dialog {
    position: absolute;
    top: 0;
    right: 0;
    height: 100%;
    width: min(860px, 100vw);
    max-width: 100vw;
    background: #ffffff;
    border-radius: 20px 0 0 20px;
    overflow-y: auto;
    border: 1px solid rgba(232,131,10,0.15);
    border-right: none;
    animation: lw-slideInRight 0.38s cubic-bezier(0.22, 1, 0.36, 1) both;
    box-shadow: -6px 0 40px rgba(0,0,0,0.18), -1px 0 0 rgba(232,131,10,0.10);
    scrollbar-width: thin;
    scrollbar-color: rgba(232,131,10,0.2) transparent;
    pointer-events: all;
    display: flex;
    flex-direction: column;
}
.lw-modal.lw-closing .lw-dialog {
    animation: lw-slideOutRight 0.28s ease-in forwards;
}
.lw-modal.lw-closing .lw-backdrop {
    animation: lw-backdropOut 0.28s ease-in forwards;
}
.lw-dialog::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent 0%, #e8830a 20%, #f6a500 50%, #ffd700 65%, #f6a500 80%, transparent 100%);
    animation: lw-border-glow 2.5s ease-in-out infinite;
    z-index: 10;
}
.lw-dialog::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(246,165,0,0.3), transparent);
    pointer-events: none;
}

/* ===== Header ===== */
.lw-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 18px 22px 16px;
    background: #fff;
    border-bottom: 1px solid rgba(232,131,10,0.08);
    position: relative;
}

.lw-title {
    font-size: 17px;
    font-weight: 900;
    letter-spacing: 0.3px;
    color: #1a1a2e;
    display: flex;
    align-items: center;
    gap: 10px;
}
.lw-title::before {
    content: '\f5bb';
    font-family: 'Font Awesome 6 Free', 'Font Awesome 5 Free', FontAwesome;
    font-weight: 900;
    font-size: 19px;
    background: linear-gradient(135deg, #f6a500, #ffd700);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline-block;
    animation: lw-spin-slow 8s linear infinite;
}

.lw-close {
    border: 1px solid rgba(0,0,0,0.12);
    background: #f5f5f5;
    color: #555;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.22s ease;
    flex-shrink: 0;
    line-height: 1;
}
.lw-close:hover {
    background: #e8830a;
    border-color: #c46a06;
    color: #fff;
    transform: rotate(90deg) scale(1.1);
}

.lw-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    flex: 1;
    min-height: 0;
}
@media (max-width: 560px) {
    .lw-body {
        grid-template-columns: 1fr;
    }
    .lw-dialog { width: 100vw; border-radius: 0; }
}

/* ===== Wheel area ===== */
.lw-wheel-area {
    padding: 32px 24px;
    background: linear-gradient(145deg, #f7f7f8 0%, #f0f0f3 100%);
    border-right: 1px solid rgba(232,131,10,0.08);
    border-bottom: none;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}
@media (max-width: 560px) {
    .lw-wheel-area {
        border-right: none;
        border-bottom: 1px solid rgba(232,131,10,0.08);
    }
}
.lw-wheel-area::before {
    content: '';
    position: absolute;
    width: 420px; height: 420px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(232,131,10,0.06) 0%, transparent 65%);
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}
.lw-wheel-wrap {
    position: relative;
    width: clamp(242px, 86vw, 396px);
    aspect-ratio: 1 / 1;
    max-width: 100%;
    margin: 0 auto;
}
.lw-wheel-wrap::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 3px solid rgba(232,131,10,0.18);
    animation: lw-pulse-gold 3s ease-in-out infinite;
    pointer-events: none;
    z-index: 2;
}
.lw-wheel-wrap::after {
    content: '';
    position: absolute;
    inset: -14px;
    border-radius: 50%;
    border: 1.5px solid rgba(232,131,10,0.09);
    animation: lw-pulse-gold 3s ease-in-out infinite 0.9s;
    pointer-events: none;
}

/* ===== Pointer / nyíl ===== */
.lw-pointer {
    position: absolute;
    top: 50%;
    right: -22px;
    transform: translateY(-50%);
    width: auto;
    height: auto;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    z-index: 10;
}
.lw-pointer-icon {
    display: block;
    font-size: 38px;
    color: #e8830a;
    transform: rotate(90deg);
    transform-origin: center center;
    filter: drop-shadow(-2px 0 6px rgba(232,131,10,0.50)) drop-shadow(0 2px 4px rgba(0,0,0,0.20));
    line-height: 1;
    animation: lw-pointer-glow 2s ease-in-out infinite;
}
.lw-pointer::before { content: none; }
.lw-pointer::after  { content: none; }

/* ===== Kerék ===== */
.lw-wheel {
    width: 100%; height: 100%;
    border-radius: 50%;
    background: transparent;
    overflow: visible;
    position: relative;
    z-index: 1;
}
.lw-wheel canvas {
    width: 100%; height: 100%;
    display: block;
    transition: transform 4.8s cubic-bezier(0.05, 0.85, 0.08, 1.0);
    border-radius: 50%;
    animation: lw-wheel-glow 3s ease-in-out infinite;
}

/* ===== Kerék közép ===== */
.lw-wheel-center {
    position: absolute;
    left: 50%; top: 50%;
    transform: translate(-50%, -50%);
    width: 58px; height: 58px;
    border-radius: 50%;
    background: radial-gradient(circle at 38% 32%, #fff 0%, #f0f0f0 60%, #e0e0e0 100%);
    border: 3px solid #e8830a;
    display: flex; align-items: center; justify-content: center;
    z-index: 3;
    box-shadow: 0 0 0 4px rgba(232,131,10,0.12), 0 4px 16px rgba(0,0,0,0.20);
    cursor: pointer;
    font-size: 0;
}
.lw-wheel-center::before {
    content: '\2605';
    font-size: 22px;
    color: #e8830a;
    -webkit-text-fill-color: #e8830a;
    line-height: 1;
}


/* ===== Jobb panel ===== */
.lw-panel {
    padding: 28px 26px;
    background: #ffffff;
    display: flex;
    align-items: center;
}
.lw-row {
    display: grid;
    gap: 18px;
    width: 100%;
}

/* Promo szöveg a panel tetején */
.lw-row::before {
    content: '\f3a5  Nyerd meg kedvezményed!';
    font-family: 'Font Awesome 6 Free', 'Font Awesome 5 Free', FontAwesome, sans-serif;
    font-weight: 900;
    font-size: 13px;
    color: #e8830a;
    letter-spacing: 0.8px;
    text-transform: uppercase;
}

/* ===== Email mező ===== */
.lw-field label {
    font-size: 11px;
    font-weight: 700;
    color: #666;
    display: block;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.lw-field label::before {
    content: '\f0e0  ';
    font-family: 'Font Awesome 6 Free', 'Font Awesome 5 Free', FontAwesome;
    font-weight: 900;
    color: #e8830a;
}
.lw-field input {
    width: 100%;
    padding: 14px 16px;
    border-radius: 12px;
    border: 1px solid #ddd;
    font-size: 14px;
    background: #fff;
    color: #1a1a2e;
    transition: all 0.25s ease;
    box-sizing: border-box;
    outline: none;
}
.lw-field input::placeholder { color: #aaa; }
.lw-field input:focus {
    border-color: #e8830a;
    box-shadow: 0 0 0 3px rgba(232,131,10,0.10);
}

/* ===== Akció gombok ===== */
.lw-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}
.lw-btn {
    border: none;
    border-radius: 12px;
    padding: 14px 22px;
    font-weight: 800;
    cursor: pointer;
    font-size: 14px;
    letter-spacing: 0.3px;
    transition: all 0.22s ease;
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.lw-btn-primary {
    background: linear-gradient(135deg, #f5a52a 0%, #e8830a 50%, #c46a06 100%);
    background-size: 200% auto;
    color: #fff;
    box-shadow: 0 6px 22px rgba(232,131,10,0.45);
    border: 1px solid rgba(255,255,255,0.12);
}
.lw-btn-primary::before {
    content: '\f01e';
    font-family: 'Font Awesome 6 Free', 'Font Awesome 5 Free', FontAwesome;
    font-weight: 900;
    font-size: 15px;
}
.lw-btn-primary::after {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 60%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.22), transparent);
    transform: skewX(-18deg);
    animation: lw-shimmer 2.8s ease-in-out infinite;
}
.lw-btn-primary:hover:not(:disabled) {
    transform: translateY(-2px) scale(1.03);
    box-shadow: 0 10px 28px rgba(232,131,10,0.55);
    filter: brightness(1.1);
}
.lw-btn-primary:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
}
.lw-btn-outline {
    background: #fff;
    border: 1px solid #e8830a;
    color: #e8830a;
}
.lw-btn-outline:hover {
    background: rgba(232,131,10,0.05);
    border-color: #c46a06;
    color: #c46a06;
    transform: translateY(-1px);
}

/* ===== Üzenet ===== */
.lw-msg {
    font-size: 13px;
    color: #444;
    min-height: 0;
    display: flex;
    align-items: center;
    gap: 6px;
}
.lw-msg:not(:empty)::before {
    content: '\f05a';
    font-family: 'Font Awesome 6 Free', 'Font Awesome 5 Free', FontAwesome;
    font-weight: 900;
    font-size: 13px;
    color: #e8830a;
    opacity: 0.8;
}
.lw-msg.lw-error { color: #e8830a; }
.lw-msg.lw-error::before {
    content: '\f06a';
    color: #e8830a;
    opacity: 1;
}

/* ===== Eredmény kártya ===== */
.lw-result {
    padding: 20px;
    border: 1px solid rgba(232,131,10,0.18);
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(232,131,10,0.04) 0%, #fff8f8 100%);
    animation: lw-bounce-in 0.6s cubic-bezier(0.34,1.56,0.64,1) both;
    position: relative;
    overflow: hidden;
}
.lw-result::before {
    content: '\f091';
    font-family: 'Font Awesome 6 Free', 'Font Awesome 5 Free', FontAwesome;
    font-weight: 900;
    position: absolute;
    top: -10px; right: -10px;
    font-size: 80px;
    color: rgba(232,131,10,0.06);
    line-height: 1;
    pointer-events: none;
}
.lw-result > div:first-child {
    font-weight: 800;
    font-size: 13px;
    color: #e8830a;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 7px;
}
.lw-result > div:first-child::before {
    content: '\f005';
    font-family: 'Font Awesome 6 Free', 'Font Awesome 5 Free', FontAwesome;
    font-weight: 900;
    color: #f6a500;
    font-size: 14px;
    animation: lw-star-twinkle 1.5s ease-in-out infinite;
}
.lw-result > div:nth-child(2) {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

/* ===== Kuponkód ===== */
.lw-code {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Courier New", monospace;
    font-weight: 900;
    letter-spacing: 2px;
    font-size: 18px;
    padding: 12px 18px;
    border-radius: 12px;
    border: 2px dashed rgba(232,131,10,0.40);
    background: #fff;
    color: #e8830a;
    box-shadow: 0 2px 12px rgba(232,131,10,0.10);
    animation: lw-code-pulse 2.5s ease-in-out infinite;
}

/* ===== Tipp szöveg ===== */
.lw-hint {
    margin-top: 12px;
    font-size: 12px;
    color: #888;
    display: flex;
    align-items: flex-start;
    gap: 6px;
    line-height: 1.5;
}
.lw-hint::before {
    content: '\f017';
    font-family: 'Font Awesome 6 Free', 'Font Awesome 5 Free', FontAwesome;
    font-weight: 900;
    font-size: 11px;
    margin-top: 1px;
    color: #e8830a;
    opacity: 0.6;
    flex-shrink: 0;
}

/* ===== Win celebration overlay ===== */
@keyframes lw-win-in {
    0%   { opacity: 0; transform: scale(0.80) translateY(30px); }
    60%  { opacity: 1; transform: scale(1.04) translateY(-6px); }
    100% { opacity: 1; transform: scale(1) translateY(0); }
}
@keyframes lw-win-icon-bounce {
    0%,100% { transform: scale(1) rotate(-5deg); }
    30%      { transform: scale(1.28) rotate(8deg); }
    60%      { transform: scale(0.94) rotate(-3deg); }
}
@keyframes lw-confetti-fall {
    0%   { transform: translateY(-20px) rotate(0deg); opacity: 1; }
    80%  { opacity: 1; }
    100% { transform: translateY(420px) rotate(var(--rot, 360deg)); opacity: 0; }
}

.lw-win-overlay {
    position: absolute;
    inset: 0;
    z-index: 200;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: inherit;
}

.lw-win-x {
    position: absolute;
    top: 14px;
    right: 16px;
    z-index: 10;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: 1px solid rgba(0,0,0,0.12);
    background: #f5f5f5;
    color: #555;
    font-size: 20px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: all 0.18s ease;
}
.lw-win-x:hover {
    background: #e8830a;
    border-color: #c46a06;
    color: #fff;
    transform: rotate(90deg);
}

.lw-win-confetti {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}
.lw-confetti-piece {
    position: absolute;
    top: -12px;
    animation: lw-confetti-fall linear forwards;
    opacity: 0.9;
}

.lw-win-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
    padding: 40px 48px;
    text-align: center;
    animation: lw-win-in 0.65s cubic-bezier(0.34, 1.56, 0.64, 1) both;
    width: 100%;
    box-sizing: border-box;
}
@media (max-width: 576px) {
    .lw-win-content { padding: 32px 20px; }
}

.lw-win-icon {
    font-size: 72px;
    line-height: 1;
    animation: lw-win-icon-bounce 1.2s ease-in-out infinite;
    filter: drop-shadow(0 4px 18px rgba(255,200,0,0.55));
}

.lw-win-title {
    font-size: 36px;
    font-weight: 900;
    letter-spacing: -0.5px;
    color: #1a1a2e;
    line-height: 1.1;
}

.lw-win-prize {
    font-size: 20px;
    font-weight: 800;
    color: #ff6600;
    letter-spacing: 0.2px;
    margin-top: -6px;
}

.lw-win-subtitle {
    font-size: 14px;
    color: #888;
    font-weight: 500;
    margin-top: -10px;
}

.lw-win-coupon {
    background: #fff8f2;
    border: 1.5px solid rgba(255,102,0,0.20);
    border-radius: 18px;
    padding: 20px 24px;
    width: 100%;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.lw-win-coupon-label {
    font-size: 11px;
    font-weight: 700;
    color: #e8830a;
    text-transform: uppercase;
    letter-spacing: 1.2px;
}

.lw-win-coupon-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.lw-win-overlay .lw-code {
    font-size: 20px;
    padding: 12px 20px;
    border-color: rgba(255,102,0,0.35);
    background: #fff;
    color: #ff6600;
    letter-spacing: 3px;
}

.lw-win-overlay .lw-btn-outline {
    background: #fff;
    border-color: #e8830a;
    color: #e8830a;
    font-size: 13px;
    padding: 10px 16px;
}
.lw-win-overlay .lw-btn-outline:hover {
    background: rgba(232,131,10,0.07);
    border-color: #c46a06;
    color: #c46a06;
}

.lw-win-overlay .lw-hint {
    display: block;
    color: #666;
    font-size: 12px;
    line-height: 1.9;
    text-align: left;
}
.lw-win-overlay .lw-hint::before { display: none; }

.lw-win-overlay .lw-btn-primary {
    width: 100%;
    justify-content: center;
    padding: 16px 24px;
    font-size: 15px;
    background: linear-gradient(135deg, #f5a52a 0%, #e8830a 100%);
    box-shadow: 0 8px 28px rgba(232,131,10,0.35);
}

/* ===== Responsive ===== */
@media (max-width: 576px) {
    .lw-dialog { border-radius: 0; width: 100vw; }
    .lw-wheel-area { padding: 18px 14px; }
    .lw-panel { padding: 20px 16px; }
    .lw-actions { justify-content: stretch; }
    .lw-actions .lw-btn { flex: 1; justify-content: center; }
    .lw-pointer { right: -16px; }
    .lw-pointer-icon { font-size: 28px; }
}
