body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: linear-gradient(180deg, #0a0a23 0%, #1a1a4e 50%, #2e2e7a 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    padding: 20px 20px 80px 20px;
    box-sizing: border-box;
    overflow-x: hidden;
    background-image: url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"%3E%3Ccircle cx="10" cy="10" r="2" fill="rgba(255,255,255,0.2)" /%3E%3Ccircle cx="50" cy="50" r="3" fill="rgba(255,255,255,0.3)" /%3E%3Ccircle cx="90" cy="90" r="2" fill="rgba(255,255,255,0.2)" /%3E%3C/svg%3E');
    background-size: 50px 50px;
    animation: starryBackground 50s linear infinite;
}

@keyframes starryBackground {
    from { background-position: 0 0; }
    to { background-position: 0 1000px; }
}

.container {
    background: linear-gradient(135deg, rgba(30, 30, 60, 0.9), rgba(50, 50, 100, 0.7));
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    box-shadow: 0 0 30px rgba(100, 100, 255, 0.3), inset 0 0 10px rgba(255, 255, 255, 0.1);
    padding: 30px;
    width: 100%;
    max-width: 400px;
    text-align: center;
    flex-grow: 1;
    backdrop-filter: blur(10px);
    animation: containerGlow 3s ease-in-out infinite alternate;
}

@keyframes containerGlow {
    0% { box-shadow: 0 0 30px rgba(100, 100, 255, 0.3), inset 0 0 10px rgba(255, 255, 255, 0.1); }
    100% { box-shadow: 0 0 40px rgba(100, 100, 255, 0.5), inset 0 0 15px rgba(255, 255, 255, 0.2); }
}

.section-title {
    font-size: 24px;
    font-weight: bold;
    color: #ffffff;
    text-shadow: 0 0 10px rgba(100, 100, 255, 0.8);
    margin-bottom: 20px;
    letter-spacing: 1px;
}

.stats-box {
    background: linear-gradient(45deg, rgba(50, 50, 100, 0.8), rgba(100, 100, 255, 0.4));
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    padding: 15px;
    margin-bottom: 20px;
    font-size: 16px;
    color: #ffffff;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.5);
    animation: statsPulse 2s ease-in-out infinite;
}

@keyframes statsPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); }
}

.roulette-container {
    position: relative;
    width: 100%;
    height: 120px;
    overflow: hidden;
    margin-bottom: 20px;
    border-radius: 15px;
    border: 2px solid rgba(100, 100, 255, 0.5);
    background: linear-gradient(90deg, rgba(20, 20, 50, 0.9), rgba(40, 40, 80, 0.7));
    box-shadow: 0 0 20px rgba(100, 100, 255, 0.4);
    mask-image: linear-gradient(to right,
        transparent 0%,
        black 10%,
        black 90%,
        transparent 100%
    );
    -webkit-mask-image: linear-gradient(to right,
        transparent 0%,
        black 10%,
        black 90%,
        transparent 100%
    );
}

.roulette-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 100%;
    background: linear-gradient(to bottom, #ffffff, #6464ff);
    z-index: 9;
    box-shadow: 0 0 15px rgba(100, 100, 255, 1);
    animation: pointerGlow 1.5s ease-in-out infinite;
}

@keyframes pointerGlow {
    0% { box-shadow: 0 0 15px rgba(100, 100, 255, 1); }
    50% { box-shadow: 0 0 25px rgba(100, 100, 255, 1.5); }
    100% { box-shadow: 0 0 15px rgba(100, 100, 255, 1); }
}

.roulette-wheel {
    display: flex;
    height: 100%;
    align-items: center;
}

.gift-item {
    flex-shrink: 0;
    width: 100px;
    height: 100px;
    margin: 0 5px;
    background: linear-gradient(45deg, rgba(255, 255, 255, 0.1), rgba(100, 100, 255, 0.2));
    border-radius: 10px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    box-shadow: 0 0 15px rgba(100, 100, 255, 0.5);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gift-item:hover {
    transform: scale(1.05);
    box-shadow: 0 0 25px rgba(100, 100, 255, 0.8);
}

.gift-item-placeholder,
.won-gift-placeholder,
.modal-content.withdrawal-details .gift-image-placeholder,
.gift-item-modal .gift-icon {
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    background-color: transparent;
    border: none;
    padding: 0;
}

.gift-item-placeholder img,
.won-gift-placeholder img,
.modal-content.withdrawal-details .gift-image-placeholder img,
.gift-item-modal .gift-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.5));
}

.gift-item-placeholder {
    width: 50px;
    height: 50px;
    border-radius: 8px;
}

.won-gift-placeholder {
    width: 80px;
    height: 80px;
    border-radius: 10px;
}

.modal-content.withdrawal-details .gift-image-placeholder {
    width: 120px;
    height: 120px;
    border-radius: 20px;
    border: 3px solid rgba(100, 100, 255, 0.7);
    box-shadow: 0 0 15px rgba(100, 100, 255, 0.6);
}

.gift-name {
    font-size: 12px;
    font-weight: bold;
    color: #ffffff;
    text-shadow: 0 0 5px rgba(100, 100, 255, 0.8);
    word-break: break-word;
    padding: 0 5px;
}

.spin-button {
    background: linear-gradient(90deg, #6464ff, #ff64ff);
    color: #ffffff;
    border: none;
    border-radius: 25px;
    padding: 15px 30px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
    width: 100%;
    box-shadow: 0 0 15px rgba(100, 100, 255, 0.5);
}

.spin-button:hover {
    background: linear-gradient(90deg, #ff64ff, #6464ff);
    transform: scale(1.05);
    box-shadow: 0 0 25px rgba(100, 100, 255, 0.8);
}

.spin-button:disabled {
    background: linear-gradient(90deg, #4a4a7a, #6a6a9a);
    cursor: not-allowed;
    box-shadow: none;
}

.won-gift-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px dashed rgba(255, 255, 255, 0.3);
    text-align: center;
    display: none;
}

.won-gift-section.active {
    display: block;
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.won-gift-title {
    font-size: 20px;
    font-weight: bold;
    color: #ffffff;
    text-shadow: 0 0 10px rgba(100, 100, 255, 0.8);
    margin-bottom: 15px;
}

.won-gift-card {
    background: linear-gradient(135deg, rgba(30, 30, 60, 0.9), rgba(50, 50, 100, 0.7));
    border-radius: 15px;
    border: 2px solid rgba(100, 100, 255, 0.5);
    padding: 20px;
    margin: 0 auto;
    max-width: 250px;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 0 20px rgba(100, 100, 255, 0.4);
    animation: cardGlow 2s ease-in-out infinite alternate;
}

@keyframes cardGlow {
    0% { box-shadow: 0 0 20px rgba(100, 100, 255, 0.4); }
    100% { box-shadow: 0 0 30px rgba(100, 100, 255, 0.6); }
}

.won-gift-name {
    font-size: 18px;
    font-weight: bold;
    color: #ffffff;
    text-shadow: 0 0 5px rgba(100, 100, 255, 0.8);
    margin-bottom: 10px;
}

.won-gift-date {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 15px;
}

.withdrawal-btn {
    background: linear-gradient(90deg, #64ffda, #00b7eb);
    color: #ffffff;
    border: none;
    border-radius: 20px;
    padding: 10px 20px;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
    box-shadow: 0 0 15px rgba(100, 255, 255, 0.5);
}

.withdrawal-btn:hover {
    background: linear-gradient(90deg, #00b7eb, #64ffda);
    transform: scale(1.05);
    box-shadow: 0 0 25px rgba(100, 255, 255, 0.8);
}

.referral-info {
    margin-top: 20px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 15px;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(30, 30, 60, 0.8), rgba(50, 50, 100, 0.6));
    box-shadow: 0 0 15px rgba(100, 100, 255, 0.3);
    animation: fadeIn 0.5s ease-in-out;
}

.understand-btn {
    background: linear-gradient(90deg, #ff64ff, #6464ff);
    color: #ffffff;
    border: none;
    border-radius: 20px;
    padding: 8px 15px;
    margin-top: 10px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
    box-shadow: 0 0 15px rgba(100, 100, 255, 0.5);
}

.understand-btn:hover {
    background: linear-gradient(90deg, #6464ff, #ff64ff);
    transform: scale(1.05);
    box-shadow: 0 0 25px rgba(100, 100, 255, 0.8);
}

.footer-nav {
    display: flex;
    justify-content: space-around;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(180deg, rgba(20, 20, 50, 0.9), rgba(40, 40, 80, 0.7));
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding: 10px 0;
    box-shadow: 0 -2px 20px rgba(100, 100, 255, 0.3);
    width: 100%;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: rgba(255, 255, 255, 0.6);
    font-size: 12px;
    text-decoration: none;
    flex: 1;
    transition: color 0.3s ease, transform 0.2s ease;
}

.nav-item:hover {
    color: #ffffff;
    transform: scale(1.1);
}

.nav-item.active {
    color: #ffffff;
    font-weight: bold;
    text-shadow: 0 0 10px rgba(100, 100, 255, 0.8);
}

.nav-item .nav-icon {
    font-size: 24px;
    margin-bottom: 5px;
    transition: transform 0.3s ease;
}

.nav-item:hover .nav-icon {
    transform: rotate(360deg);
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(20, 20, 50, 0.8), rgba(0, 0, 30, 0.9));
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    visibility: hidden;
    opacity: 0;
    transition: visibility 0s, opacity 0.4s ease;
    padding: 20px;
    box-sizing: border-box;
}

.overlay.active {
    visibility: visible;
    opacity: 1;
}

.modal-content {
    background: linear-gradient(135deg, rgba(30, 30, 60, 0.9), rgba(50, 50, 100, 0.7));
    padding: 30px;
    border-radius: 20px;
    text-align: center;
    max-width: 300px;
    box-shadow: 0 0 30px rgba(100, 100, 255, 0.5);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    animation: modalPop 0.4s ease-out;
}

@keyframes modalPop {
    0% { transform: scale(0.8); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.modal-content.gifts-list {
    max-width: 350px;
    text-align: left;
}

.modal-content h3 {
    color: #ffffff;
    text-shadow: 0 0 10px rgba(100, 100, 255, 0.8);
    margin-bottom: 15px;
}

.modal-content p {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 20px;
}

.modal-content button {
    background: linear-gradient(90deg, #ff64ff, #6464ff);
    color: #ffffff;
    border: none;
    border-radius: 20px;
    padding: 10px 20px;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
    box-shadow: 0 0 15px rgba(100, 100, 255, 0.5);
}

.modal-content button:hover {
    background: linear-gradient(90deg, #6464ff, #ff64ff);
    transform: scale(1.05);
    box-shadow: 0 0 25px rgba(100, 100, 255, 0.8);
}

.gifts-list-container {
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 20px;
}

.gift-item-modal {
    display: flex;
    align-items: center;
    background: linear-gradient(45deg, rgba(50, 50, 100, 0.8), rgba(100, 100, 255, 0.4));
    border-radius: 10px;
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gift-item-modal:hover {
    transform: scale(1.02);
    box-shadow: 0 0 15px rgba(100, 100, 255, 0.6);
}

.gift-item-modal .gift-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    margin-right: 10px;
    flex-shrink: 0;
}

.gift-item-modal .gift-details {
    flex-grow: 1;
}

.gift-item-modal .gift-details .name {
    font-weight: bold;
    color: #ffffff;
    font-size: 15px;
    text-shadow: 0 0 5px rgba(100, 100, 255, 0.8);
}

.gift-item-modal .gift-details .date {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
}

.gift-item-modal .withdrawal-btn-small {
    background: linear-gradient(90deg, #64ffda, #00b7eb);
    color: #ffffff;
    border: none;
    border-radius: 15px;
    padding: 6px 12px;
    font-size: 13px;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
    margin-left: auto;
    flex-shrink: 0;
    box-shadow: 0 0 10px rgba(100, 255, 255, 0.5);
}

.gift-item-modal .withdrawal-btn-small:hover {
    background: linear-gradient(90deg, #00b7eb, #64ffda);
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(100, 255, 255, 0.8);
}

.modal-content.withdrawal-details {
    padding: 30px;
    border-radius: 20px;
    text-align: center;
    width: 90%;
    max-width: 500px;
    height: auto;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 0 30px rgba(100, 100, 255, 0.5);
    transform: translateY(20px);
    opacity: 0;
    transition: transform 0.4s ease, opacity 0.4s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.overlay.active .modal-content.withdrawal-details {
    transform: translateY(0);
    opacity: 1;
}

.modal-content.withdrawal-details .gift-image-placeholder {
    width: 120px;
    height: 120px;
    border-radius: 20px;
    border: 3px solid rgba(100, 100, 255, 0.7);
    box-shadow: 0 0 15px rgba(100, 100, 255, 0.6);
    margin: 0 auto 20px auto;
}

.modal-content.withdrawal-details .gift-title {
    font-size: 24px;
    font-weight: bold;
    color: #ffffff;
    text-shadow: 0 0 10px rgba(100, 100, 255, 0.8);
    margin-bottom: 20px;
}

.modal-content.withdrawal-details .withdrawal-instruction {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.8);
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px dashed rgba(255, 255, 255, 0.3);
    text-align: left;
    flex-grow: 1;
}

.modal-content.withdrawal-details p {
    margin-bottom: 10px;
    line-height: 1.5;
}

.modal-content.withdrawal-details ol {
    list-style-type: decimal;
    list-style-position: inside;
    padding-left: 0;
    margin-bottom: 20px;
}

.modal-content.withdrawal-details ol li {
    margin-bottom: 8px;
}

.modal-content.withdrawal-details .close-button {
    margin-top: 30px;
    background: linear-gradient(90deg, #ff64ff, #6464ff);
    color: #ffffff;
    border: none;
    border-radius: 25px;
    padding: 12px 25px;
    font-size: 18px;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
    width: 100%;
    box-shadow: 0 0 15px rgba(100, 100, 255, 0.5);
}

.modal-content.withdrawal-details .close-button:hover {
    background: linear-gradient(90deg, #6464ff, #ff64ff);
    transform: scale(1.05);
    box-shadow: 0 0 25px rgba(100, 100, 255, 0.8);
}

.modal-content:not(.withdrawal-details) {
    max-width: 300px;
}

.modal-content.info-details {
    max-width: 500px;
    text-align: left;
    line-height: 1.6;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
    max-height: 90vh;
    overflow-y: auto;
}

.modal-content.info-details h3 {
    text-align: center;
    margin-bottom: 25px;
    color: #ffffff;
    text-shadow: 0 0 10px rgba(100, 100, 255, 0.8);
    font-size: 26px;
}

.modal-content.info-details h4 {
    font-size: 18px;
    color: #ffffff;
    text-shadow: 0 0 5px rgba(100, 100, 255, 0.8);
    margin-top: 25px;
    margin-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding-bottom: 5px;
}

.modal-content.info-details ul,
.modal-content.info-details ol {
    margin: 15px 0;
    padding-left: 20px;
}

.modal-content.info-details ul li,
.modal-content.info-details ol li {
    margin-bottom: 8px;
}

.modal-content.info-details strong {
    color: #ffffff;
    text-shadow: 0 0 5px rgba(100, 100, 255, 0.8);
}

.modal-content.info-details a {
    color: #64ffda;
    text-decoration: none;
}

.modal-content.info-details a:hover {
    text-decoration: underline;
    text-shadow: 0 0 5px rgba(100, 255, 255, 0.8);
}

.info-referral-block {
    background: linear-gradient(45deg, rgba(50, 50, 100, 0.8), rgba(100, 100, 255, 0.4));
    border-radius: 15px;
    padding: 15px;
    margin: 20px 0;
    text-align: center;
    border: 1px dashed rgba(255, 255, 255, 0.3);
    box-shadow: 0 0 15px rgba(100, 100, 255, 0.3);
}

.info-referral-block .stats {
    display: flex;
    justify-content: space-around;
    margin-bottom: 15px;
}

.info-referral-block .stat-item {
    font-size: 16px;
    color: #ffffff;
    text-shadow: 0 0 5px rgba(100, 100, 255, 0.8);
    font-weight: bold;
}

.info-referral-block .referral-link-container {
    display: flex;
    align-items: center;
    background: linear-gradient(45deg, rgba(255, 255, 255, 0.1), rgba(100, 100, 255, 0.2));
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    padding: 8px 10px;
    margin-top: 10px;
}

.info-referral-block .referral-link-input {
    flex-grow: 1;
    border: none;
    outline: none;
    font-size: 14px;
    background-color: transparent;
    color: rgba(255, 255, 255, 0.8);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.info-referral-block .copy-link-btn {
    background: linear-gradient(90deg, #64ffda, #00b7eb);
    color: #ffffff;
    border: none;
    border-radius: 15px;
    padding: 8px 15px;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
    margin-left: 10px;
    flex-shrink: 0;
    box-shadow: 0 0 10px rgba(100, 255, 255, 0.5);
}

.info-referral-block .copy-link-btn:hover {
    background: linear-gradient(90deg, #00b7eb, #64ffda);
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(100, 255, 255, 0.8);
}

.info-referral-block p {
    font-size: 13px;
    margin-bottom: 5px;
}

.info-referral-block ul {
    text-align: left;
    padding-left: 20px;
}

.modal-content button:not(.close-button):not(.withdrawal-btn-small):not(.copy-link-btn) {
    margin-top: 20px;
}