/* ===== Variables ===== */
:root {
    --primary: #6b1f2a;
    --primary-dark: #4a1519;
    --primary-light: #8b2635;
    --wheel-size: min(85vw, 420px);
    --ui-primary: #0d6efd;
    --ui-success: #198754;
    --ui-warning: #ffc107;
}

@media (max-width: 768px) {
    :root {
        --wheel-size: min(75vw, 300px);
    }
}

@media (max-width: 576px) {
    :root {
        --wheel-size: min(80vw, 280px);
    }
}

@media (max-width: 400px) {
    :root {
        --wheel-size: min(85vw, 260px);
    }
}

/* ===== Global ===== */
* {
    box-sizing: border-box;
}

html,
body {
    overflow-x: hidden;
    height: 100%;
}

/* ===== Login Page ===== */
.login-page {
    min-height: 100vh;
    height: 100vh;
    height: 100dvh;
    background: linear-gradient(
        135deg,
        #667eea 0%,
        #764ba2 25%,
        #f093fb 50%,
        #4facfe 75%,
        #00f2fe 100%
    );
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    overflow: hidden;
    position: relative;
}

.login-page::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(
            circle at 20% 50%,
            rgba(255, 255, 255, 0.1) 0%,
            transparent 50%
        ),
        radial-gradient(
            circle at 80% 80%,
            rgba(255, 255, 255, 0.1) 0%,
            transparent 50%
        );
    pointer-events: none;
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.login-wrapper {
    width: 100%;
    max-width: 450px;
    max-height: 100vh;
    max-height: 100dvh;
    overflow: hidden;
    position: relative;
    z-index: 1;
}

.login-wrapper::-webkit-scrollbar {
    width: 6px;
}

.login-wrapper::-webkit-scrollbar-track {
    background: transparent;
}

.login-wrapper::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
}

.login-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    overflow: visible;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.logo-section {
    position: relative;
}

.logo-placeholder {
    width: 120px;
    height: 120px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 8px 30px rgba(102, 126, 234, 0.4);
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    margin: 0 auto;
    padding: 15px;
}

.logo-placeholder::before {
    content: "";
    position: absolute;
    inset: -2px;
    border-radius: 24px;
    padding: 2px;
    background: linear-gradient(135deg, #667eea, #764ba2, #f093fb);
    -webkit-mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0.5;
}

.logo-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    position: relative;
    z-index: 1;
}

.logo-fallback {
    width: 100%;
    height: 100%;
}

.contact-info {
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    padding-top: 1rem;
    margin-top: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
}

.contact-info a {
    color: #667eea;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.contact-info a:hover {
    color: #764ba2;
    transform: translateY(-2px);
}

.contact-info i {
    color: #667eea;
    font-size: 0.9rem;
}

.input-group .form-control:focus {
    box-shadow: 0 0 0 0.25rem rgba(102, 126, 234, 0.25);
    border-color: #667eea;
}

.input-group-text {
    border-color: #ced4da;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    color: #667eea;
}

.form-select:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.25rem rgba(102, 126, 234, 0.25);
}

.btn-primary,
.btn-lg[id="submitBtn"] {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: #fff;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    transition: all 0.3s ease;
}

.btn-primary:hover,
.btn-lg[id="submitBtn"]:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
    transform: translateY(-2px);
}

.btn-primary:active,
.btn-lg[id="submitBtn"]:active {
    transform: translateY(0);
}

h1,
h2,
h3,
h4,
h5,
h6 {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
}

/* ===== Wheel Page ===== */
.wheel-page {
    min-height: 100vh;
    height: 100vh;
    height: 100dvh;
    background: linear-gradient(
        135deg,
        #667eea 0%,
        #764ba2 25%,
        #f093fb 50%,
        #4facfe 75%,
        #00f2fe 100%
    );
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.wheel-page::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(
            circle at 20% 50%,
            rgba(255, 255, 255, 0.1) 0%,
            transparent 50%
        ),
        radial-gradient(
            circle at 80% 80%,
            rgba(255, 255, 255, 0.1) 0%,
            transparent 50%
        );
    pointer-events: none;
}

.wheel-header-top {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    padding: 1rem 1.5rem;
    flex-shrink: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    z-index: 1;
}

.wheel-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 1rem;
    position: relative;
    z-index: 1;
    overflow: hidden;
}

.wheel-page .row {
    --bs-gutter-x: 1rem;
}

.wheel-page .col-lg-8,
.wheel-page .col-lg-4 {
    display: flex;
    flex-direction: column;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}

.wheel-page .col-lg-8 {
    align-items: center;
    justify-content: center;
    width: 100%;
}

.wheel-wrapper {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    max-width: 560px;
    margin-inline: auto;
}

.wheel-with-mascot {
    display: flex;
    flex-direction: row;
    align-items: flex-end;
    justify-content: center;
    width: 100%;
    max-width: 100%;
}

.wheel-main-col {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 0 0 auto;
    width: fit-content;
    max-width: 100%;
}

.wheel-mascot {
    flex: 0 0 auto;
    width: clamp(64px, 14vw, 100px);
    max-width: 100px;
    transform-origin: 50% 100%;
    transition: transform 0.35s ease;
    filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.2));
    user-select: none;
    pointer-events: none;
}

@media (min-width: 768px) {
    .wheel-mascot {
        position: absolute;
        bottom: 0;
        left: 0;
        transform: translateX(calc(-100% - 0.45rem));
    }
}

.wheel-mascot-svg {
    width: 100%;
    height: auto;
    display: block;
}

.wheel-mascot .mascot-face {
    opacity: 0;
    transition: opacity 0.25s ease;
}

.wheel-mascot[data-state="idle"] .mascot-face--idle {
    opacity: 1;
}

.wheel-mascot[data-state="spinning"] .mascot-face--spin {
    opacity: 1;
}

.wheel-mascot[data-state="win"] .mascot-face--win {
    opacity: 1;
}

.wheel-mascot[data-state="lose"] .mascot-face--lose {
    opacity: 1;
}

.wheel-mascot .mascot-hand-wave {
    opacity: 0;
    transform-origin: 78px 112px;
    transition: opacity 0.2s ease;
}

.wheel-mascot[data-state="win"] .mascot-hand-wave {
    opacity: 1;
}

.wheel-mascot[data-state="idle"] {
    animation: mascotIdle 2.8s ease-in-out infinite;
}

.wheel-mascot[data-state="spinning"] {
    animation: mascotSpinning 0.55s ease-in-out infinite;
}

.wheel-mascot[data-state="win"] {
    animation: mascotWin 0.9s ease-out 1;
}

.wheel-mascot[data-state="lose"] {
    animation: mascotLose 1s ease-out 1;
}

.wheel-mascot[data-state="win"] .mascot-hand-wave {
    animation: mascotWave 0.6s ease-in-out infinite;
}

@keyframes mascotIdle {
    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-4px) rotate(-1.5deg);
    }
}

@keyframes mascotSpinning {
    0%,
    100% {
        transform: translateX(0) rotate(-4deg);
    }
    50% {
        transform: translateX(3px) rotate(4deg);
    }
}

@keyframes mascotSpinningStacked {
    0%,
    100% {
        transform: translateY(0) rotate(-3deg);
    }
    50% {
        transform: translateY(-4px) rotate(3deg);
    }
}

@keyframes mascotWin {
    0% {
        transform: translateY(0) scale(1);
    }
    40% {
        transform: translateY(-18px) scale(1.06) rotate(-3deg);
    }
    70% {
        transform: translateY(-6px) scale(1.02);
    }
    100% {
        transform: translateY(0) scale(1);
    }
}

@keyframes mascotLose {
    0% {
        transform: translateY(0);
    }
    25% {
        transform: translateY(4px) rotate(4deg);
    }
    50% {
        transform: translateY(2px) rotate(-2deg);
    }
    100% {
        transform: translateY(0);
    }
}

@keyframes mascotWave {
    0%,
    100% {
        transform: rotate(0deg);
    }
    50% {
        transform: rotate(-12deg);
    }
}

@media (prefers-reduced-motion: reduce) {
    .wheel-mascot,
    .wheel-mascot[data-state="idle"],
    .wheel-mascot[data-state="spinning"],
    .wheel-mascot[data-state="win"],
    .wheel-mascot[data-state="lose"],
    .wheel-mascot[data-state="win"] .mascot-hand-wave {
        animation: none !important;
    }

    .gift-sparkle,
    .gift-card__shine {
        animation: none !important;
    }

    .wheel-container--glow::before {
        animation: none !important;
        opacity: 0.35;
    }
}

@media (max-width: 767.98px) {
    .wheel-with-mascot {
        width: 100%;
    }

    .wheel-main-col {
        width: 100%;
        max-width: 100%;
        flex-direction: column;
        align-items: center;
    }

    .wheel-container {
        order: 1;
    }

    .wheel-mascot {
        position: static !important;
        transform: none !important;
        width: clamp(52px, 18vw, 68px);
        max-width: 68px;
        margin-top: 0.15rem;
        order: 2;
    }

    .wheel-mascot[data-state="spinning"] {
        animation: mascotSpinningStacked 0.55s ease-in-out infinite;
    }
}

@media (max-width: 992px) {
    .wheel-page .col-lg-8 {
        min-height: auto;
        width: 100%;
        max-width: 100%;
    }

    .wheel-wrapper {
        width: 100%;
        max-width: 100%;
    }
}

.logo-small {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 8px;
    backdrop-filter: blur(5px);
}

.logo-small-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.wheel-container {
    position: relative;
    width: var(--wheel-size);
    height: var(--wheel-size);
    max-width: 420px;
    max-height: 420px;
    margin: 0 auto;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    isolation: isolate;
}

.wheel-container--glow::before {
    content: "";
    position: absolute;
    inset: -18px;
    border-radius: 50%;
    z-index: 0;
    pointer-events: none;
    background: conic-gradient(
        from 0deg,
        rgba(102, 126, 234, 0.75),
        rgba(240, 147, 251, 0.8),
        rgba(79, 172, 254, 0.75),
        rgba(255, 200, 100, 0.65),
        rgba(102, 126, 234, 0.75)
    );
    filter: blur(14px);
    opacity: 0.65;
    animation: wheelGlowTurn 6s linear infinite;
}

.wheel-container--spinning::before {
    animation-duration: 1.1s;
    opacity: 0.92;
    filter: blur(18px);
    inset: -24px;
}

@keyframes wheelGlowTurn {
    to {
        transform: rotate(360deg);
    }
}

.wheel-canvas {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    box-shadow:
        0 0 0 8px rgba(255, 255, 255, 0.1),
        0 0 28px rgba(102, 126, 234, 0.4),
        0 0 48px rgba(240, 147, 251, 0.25),
        0 10px 40px rgba(0, 0, 0, 0.3);
}

.wheel-pointer {
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 20px solid transparent;
    border-right: 20px solid transparent;
    border-top: 28px solid var(--primary);
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
    z-index: 10;
}

.spin-btn {
    font-size: 1.25rem;
    padding: 0.75rem 2.5rem;
    border-radius: 50px;
    font-weight: 600;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: #fff;
    flex-shrink: 0;
    margin: 0;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    transition: all 0.3s ease;
    display: inline-block;
    width: auto;
}

.spin-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
    transform: translateY(-2px);
}

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

.sidebar-card {
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(15px);
    border-radius: 1.25rem;
    padding: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease;
}

.sidebar-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.15);
}

.sidebar-card h6 {
    color: #ffd700;
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
    text-transform: none;
    letter-spacing: 0.5px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    padding-bottom: 0.75rem;
}

.sidebar-card h6::after {
    display: none;
}

#sidebarWinners, #sidebarParticipants {
    background: linear-gradient(135deg, #fff 0%, #e0e0e0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

#sidebarWinners {
    color: #4facfe;
    -webkit-text-fill-color: #4facfe;
}

.sidebar-card .value {
    font-size: 2.2rem;
    font-weight: 900;
    margin-top: 0.5rem;
}

.sidebar-card .text-white-50 {
    font-size: 0.85rem;
    opacity: 0.8;
}

#sidebarPhoneVal {
    color: #00f2fe;
    background: rgba(0, 242, 254, 0.1);
    padding: 2px 8px;
    border-radius: 6px;
}

.wheel-container::after {
    content: '';
    position: absolute;
    width: 76px;
    height: 76px;
    border-radius: 50%;
    background: transparent;
    box-shadow: 0 0 15px rgba(0,0,0,0.2);
    pointer-events: none;
    z-index: 5;
    border: 2px solid rgba(255,255,255,0.3);
}

.result-modal .modal-content {
    border-radius: 1rem;
    border: none;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.result-modal .result-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    margin: 0 auto 1rem;
}

.result-modal .result-icon.win {
    background: rgba(25, 135, 84, 0.15);
    color: var(--ui-success);
}

.result-prize .badge {
    font-size: 1.1rem;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
}

.result-modal-content {
    background: rgba(18, 18, 28, 0.85);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(14px);
}

.result-modal-header {
    background: linear-gradient(
        135deg,
        rgba(102, 126, 234, 0.35),
        rgba(118, 75, 162, 0.35),
        rgba(240, 147, 251, 0.25)
    );
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.gift-card-wrap {
    max-width: 100%;
}

.gift-sparkles {
    position: absolute;
    inset: -6% -4% -4% -4%;
    pointer-events: none;
    overflow: visible;
    z-index: 2;
}

.gift-sparkle {
    position: absolute;
    font-size: clamp(0.65rem, 2.8vw, 0.95rem);
    line-height: 1;
    opacity: 0.9;
    text-shadow: 0 0 10px rgba(255, 215, 120, 0.5);
    animation: giftSparkleFloat 2.8s ease-in-out infinite;
}

.gift-sparkle:nth-child(1) {
    top: 2%;
    left: 4%;
    animation-delay: 0s;
}

.gift-sparkle:nth-child(2) {
    top: 8%;
    right: 6%;
    animation-delay: 0.4s;
}

.gift-sparkle:nth-child(3) {
    top: 22%;
    left: 0;
    animation-delay: 0.8s;
}

.gift-sparkle:nth-child(4) {
    top: 38%;
    right: 2%;
    animation-delay: 0.2s;
}

.gift-sparkle:nth-child(5) {
    bottom: 28%;
    left: 8%;
    animation-delay: 1s;
}

.gift-sparkle:nth-child(6) {
    bottom: 12%;
    right: 10%;
    animation-delay: 0.6s;
}

.gift-sparkle:nth-child(7) {
    top: 48%;
    left: 12%;
    animation-delay: 1.2s;
}

.gift-sparkle:nth-child(8) {
    bottom: 4%;
    left: 22%;
    animation-delay: 0.3s;
}

.gift-card-wrap--lose .gift-sparkle {
    opacity: 0.35;
    filter: grayscale(0.4);
    animation-duration: 4s;
}

@keyframes giftSparkleFloat {
    0%,
    100% {
        transform: translateY(0) scale(1);
        opacity: 0.7;
    }
    50% {
        transform: translateY(-6px) scale(1.1);
        opacity: 1;
    }
}

.gift-card {
    position: relative;
    z-index: 1;
    border-radius: 18px;
    padding: 1rem 1rem 0.95rem;
    background: linear-gradient(
        155deg,
        rgba(42, 36, 58, 0.98) 0%,
        rgba(18, 16, 28, 0.99) 55%,
        rgba(28, 22, 40, 0.98) 100%
    );
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow:
        0 12px 40px rgba(0, 0, 0, 0.45),
        inset 0 1px 0 rgba(255, 255, 255, 0.07);
    overflow: hidden;
}

.gift-card--lose {
    border-color: rgba(255, 255, 255, 0.1);
    background: linear-gradient(
        155deg,
        rgba(36, 34, 44, 0.98) 0%,
        rgba(20, 18, 26, 0.99) 100%
    );
}

.gift-card__shine {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        100deg,
        transparent 35%,
        rgba(255, 255, 255, 0.07) 48%,
        transparent 62%
    );
    pointer-events: none;
    animation: giftCardShine 4.5s ease-in-out infinite;
}

@keyframes giftCardShine {
    0%,
    100% {
        transform: translateX(-8%);
        opacity: 0.5;
    }
    50% {
        transform: translateX(8%);
        opacity: 0.85;
    }
}

.gift-card__header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 0.35rem;
}

.gift-card__logo {
    border-radius: 10px;
    object-fit: contain;
    background: rgba(255, 255, 255, 0.08);
    padding: 4px;
}

.gift-card__brand {
    font-size: 0.8rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.88);
    letter-spacing: 0.02em;
}

.gift-card__label {
    font-size: 0.72rem;
    color: rgba(255, 215, 120, 0.95);
    margin-bottom: 0.35rem;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.gift-card__prize-name {
    font-size: clamp(1rem, 3.5vw, 1.2rem);
    font-weight: 800;
    line-height: 1.35;
    color: #fff;
    margin-bottom: 0.5rem;
    min-height: 1.35em;
}

.gift-card--lose .gift-card__prize-name {
    color: rgba(255, 255, 255, 0.55);
    font-weight: 600;
}

.gift-card__accent {
    height: 3px;
    border-radius: 999px;
    margin-bottom: 0.65rem;
    opacity: 0.95;
}

.gift-card__list {
    padding: 0;
}

.gift-card__row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.4rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.gift-card__row:last-of-type {
    border-bottom: none;
}

.gift-card__k {
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.72rem;
    flex: 0 0 auto;
}

.gift-card__v {
    color: rgba(255, 255, 255, 0.95);
    font-size: 0.75rem;
    text-align: end;
    direction: ltr;
}

.gift-card__note {
    color: rgba(255, 255, 255, 0.65);
    line-height: 1.45;
    border-top: 1px dashed rgba(255, 255, 255, 0.12);
    padding-top: 0.65rem !important;
}

.result-badge {
    width: 64px;
    height: 64px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
    font-size: 1.6rem;
}

.prize-card {
    border-radius: 16px;
    padding: 14px 14px 12px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.14);
}

.prize-title {
    font-size: 1.15rem;
    font-weight: 800;
    line-height: 1.3;
}

.prize-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #6b1f2a;
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.12);
    flex: 0 0 auto;
}

.result-meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.meta-item {
    border-radius: 14px;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.meta-label {
    font-size: 0.75rem;
    opacity: 0.75;
    margin-bottom: 2px;
}

.meta-value {
    font-size: 0.95rem;
    font-weight: 700;
    word-break: break-all;
}

.result-modal .btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.35);
}

.result-modal .btn-primary:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.45);
}

.result-modal .btn-outline-light {
    border-color: rgba(255, 255, 255, 0.28);
    color: rgba(255, 255, 255, 0.92);
    background: rgba(255, 255, 255, 0.06);
}

.result-modal .btn-outline-light:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.38);
}

.result-modal-dialog {
    max-width: 420px;
}

.result-modal-hero {
    align-items: flex-start;
}

.result-modal-titles .prize-title {
    font-size: 1.1rem;
}

.result-modal-prize {
    font-size: 1.35rem;
    font-weight: 800;
}

@media (min-width: 576px) {
    .result-modal-prize {
        font-size: 1.5rem;
    }
}

@media (max-width: 575.98px) {
    .result-modal-dialog {
        max-width: calc(100% - 0.75rem);
        margin: 0.35rem auto;
    }

    .result-modal-header {
        padding-top: 0.4rem !important;
        padding-bottom: 0.4rem !important;
    }

    .result-modal-header .modal-title {
        font-size: 0.85rem;
    }

    .result-modal-body {
        padding: 0.65rem 0.75rem 0.75rem !important;
    }

    .result-modal-hero {
        margin-bottom: 0.65rem !important;
    }

    .result-badge {
        width: 46px;
        height: 46px;
        border-radius: 12px;
        font-size: 1.25rem;
        box-shadow: 0 6px 14px rgba(0, 0, 0, 0.2);
    }

    .result-modal-titles .prize-title {
        font-size: 0.92rem;
        line-height: 1.25;
    }

    .result-modal-subtitle {
        font-size: 0.75rem !important;
        line-height: 1.35;
    }

    .result-modal .prize-card {
        padding: 0.5rem 0.65rem;
        margin-bottom: 0.6rem !important;
        border-radius: 12px;
    }

    .result-modal-prize {
        font-size: 0.95rem !important;
    }

    .result-modal .result-meta {
        gap: 6px;
        margin-bottom: 0.6rem !important;
    }

    .result-modal .meta-item {
        padding: 7px 9px;
        border-radius: 10px;
    }

    .result-modal .meta-label {
        font-size: 0.62rem;
    }

    .result-modal .meta-value {
        font-size: 0.78rem;
    }

    .result-modal-note {
        font-size: 0.68rem !important;
        line-height: 1.4;
        margin-bottom: 0.6rem !important;
        padding: 0.4rem 0.5rem !important;
    }

    .result-modal-actions .btn {
        font-size: 0.875rem;
    }
}

@media (max-width: 576px) {
    .result-meta {
        grid-template-columns: 1fr;
    }
}

.admin-sidebar {
    min-height: 100vh;
    background: #2a1a1e;
    padding: 1.5rem 0;
}

.admin-sidebar .nav-link {
    color: rgba(255, 255, 255, 0.8);
    padding: 0.75rem 1.25rem;
    border-radius: 0.5rem;
    margin: 0.25rem 0.5rem;
}

.admin-sidebar .nav-link:hover,
.admin-sidebar .nav-link.active {
    background: rgba(107, 31, 42, 0.3);
    color: #fff;
}

.admin-content {
    background: #f8f9fa;
    min-height: 100vh;
    padding: 1.5rem;
}

.wheel-option-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid #eee;
}

.wheel-option-row .color-picker-wrap {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid #dee2e6;
}

.table-scroll-container {
    max-height: calc(100vh - 250px);
    overflow-y: auto;
    position: relative;
}

.table-scroll-container thead {
    position: sticky;
    top: 0;
    z-index: 10;
    background: #f8f9fa;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.table-scroll-container::-webkit-scrollbar {
    width: 6px;
}

.table-scroll-container::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.table-scroll-container::-webkit-scrollbar-thumb {
    background: #ddd;
    border-radius: 10px;
}

.table-scroll-container::-webkit-scrollbar-thumb:hover {
    background: #ccc;
}

/* Responsive */
@media (max-width: 992px) {
    .wheel-page .col-lg-4 {
        margin-top: 1rem;
        max-height: none;
    }

    .wheel-page .row {
        flex-direction: column;
    }

    .wheel-page .col-lg-8 {
        width: 100%;
        max-width: 100%;
    }

    .wheel-page .col-lg-4 {
        width: 100%;
        max-width: 100%;
    }
}

@media (max-width: 991.98px) {
    .wheel-content {
        overflow-x: hidden;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        min-height: 0;
    }

    .wheel-page .row.h-100 {
        height: auto !important;
        min-height: 0;
    }

    .wheel-page .col-lg-4 {
        flex-shrink: 0;
    }
}

@media (min-width: 769px) and (max-width: 991.98px) {
    .sidebar-info-wrap {
        flex-direction: row;
        gap: 0.75rem;
    }

    .sidebar-info-wrap .sidebar-card {
        flex: 1 1 0;
        min-width: 0;
        margin-bottom: 0;
    }

    .wheel-container.mb-5 {
        margin-bottom: 1rem !important;
    }
}

@media (max-width: 768px) {
    .login-page {
        padding: 0.5rem;
    }

    .login-wrapper {
        max-height: 100vh;
    }

    .login-card {
        margin: 0;
    }

    .login-card .card-body {
        padding: 1.75rem !important;
    }

    .logo-placeholder {
        width: 100px;
        height: 100px;
        padding: 12px;
    }

    .wheel-content {
        padding: 0.75rem;
    }

    .wheel-page .col-lg-8 {
        padding: 0.5rem;
        width: 100%;
        max-width: 100%;
        justify-content: center;
        align-items: center;
    }

    .wheel-page .col-lg-4 {
        padding: 0.5rem;
        width: 100%;
        max-width: 100%;
    }

    .wheel-wrapper {
        width: 100%;
        max-width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
    }

    .wheel-container {
        width: min(75vw, 300px);
        height: min(75vw, 300px);
        margin: 0 auto;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .sidebar-info-wrap {
        flex-direction: row;
        gap: 0.5rem;
    }

    .sidebar-info-wrap .sidebar-card {
        flex: 1 1 0;
        min-width: 0;
        margin-bottom: 0;
    }

    .wheel-container.mb-5 {
        margin-bottom: 0.75rem !important;
    }

    .wheel-content.py-4 {
        padding-top: 0.75rem !important;
        padding-bottom: 0.75rem !important;
    }

    .wheel-header-top {
        padding: 0.75rem 1rem;
    }

    .wheel-header-top .logo-small {
        width: 40px;
        height: 40px;
        padding: 6px;
    }

    .wheel-header-top .d-flex.flex-column span {
        font-size: 0.95rem;
    }

    .wheel-header-top .d-flex.flex-column small {
        font-size: 0.65rem;
    }

    .spin-btn {
        font-size: 1rem;
        padding: 0.7rem 1.8rem;
        margin: 0;
        width: auto;
        display: inline-block;
    }

    .sidebar-card {
        padding: 1rem;
        margin-bottom: 0.75rem;
    }

    .sidebar-card .value {
        font-size: 1.1rem;
    }

    .result-modal .modal-dialog {
        margin: 0.5rem;
    }

    .contact-info {
        flex-direction: column;
        gap: 0.5rem;
    }

    .contact-info > div {
        width: 100%;
        text-align: center;
    }

    .form-select {
        font-size: 0.95rem;
    }

    .input-group-lg .form-control {
        font-size: 0.95rem;
    }
}

@media (max-width: 576px) {
    .login-page {
        padding: 0.25rem;
    }

    .login-card .card-body {
        padding: 1.5rem !important;
    }

    .logo-placeholder {
        width: 90px;
        height: 90px;
        padding: 10px;
    }

    .wheel-container {
        width: min(80vw, 280px);
        height: min(80vw, 280px);
    }

    .wheel-header-top {
        padding: 0.5rem 0.75rem;
    }

    .wheel-header-top .logo-small {
        width: 36px;
        height: 36px;
        padding: 5px;
    }

    .wheel-header-top span {
        font-size: 0.9rem;
    }

    .spin-btn {
        font-size: 0.95rem;
        padding: 0.6rem 1.5rem;
    }

    .sidebar-info-wrap {
        flex-direction: column;
        gap: 0.5rem;
    }

    .sidebar-card {
        padding: 1rem;
        margin-bottom: 0.5rem;
    }

    .sidebar-card h6 {
        font-size: 0.75rem;
        margin-bottom: 0.75rem;
        padding-bottom: 0.5rem;
    }

    .sidebar-card .value {
        font-size: 1.25rem;
    }

    .sidebar-card .text-white-50 {
        font-size: 0.75rem;
    }

    #sidebarPhoneVal {
        font-size: 0.75rem;
        padding: 1px 6px;
    }

    .result-modal .modal-dialog {
        margin: 0.25rem;
    }

    h1 {
        font-size: 1.25rem;
    }
}

@media (max-width: 400px) {
    .login-card .card-body {
        padding: 1.25rem !important;
    }

    .wheel-content {
        padding: 0.25rem;
    }

    .wheel-page .col-lg-8 {
        padding: 0.25rem;
        width: 100%;
        max-width: 100%;
    }

    .wheel-wrapper {
        width: 100%;
        max-width: 100%;
    }

    .wheel-container {
        width: min(85vw, 260px);
        height: min(85vw, 260px);
        margin: 0 auto;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .logo-placeholder {
        width: 80px;
        height: 80px;
        padding: 8px;
    }

    .spin-btn {
        font-size: 0.9rem;
        padding: 0.55rem 1.2rem;
        margin: 0;
        width: auto;
        display: inline-block;
    }

    .wheel-header-top {
        padding: 0.5rem 0.75rem;
    }

    .wheel-header-top .logo-small {
        width: 32px;
        height: 32px;
        padding: 4px;
    }

    .sidebar-card {
        padding: 0.75rem;
    }

    .sidebar-card h6 {
        font-size: 0.7rem;
    }

    .sidebar-card .value {
        font-size: 0.95rem;
    }

    h1 {
        font-size: 1.15rem;
    }

    .form-select-lg {
        font-size: 0.9rem;
        padding: 0.5rem;
    }

    .input-group-lg > .form-control {
        font-size: 0.9rem;
        padding: 0.5rem;
    }
}
