body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: #021a14;
    background: radial-gradient(circle at center 20%, #0a3a2a 0%, #021a14 60%);
    color: #fff;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    overflow-x: hidden;
}

/* Loading Screen Styles */
.page-loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #021a14;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}
.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(32, 240, 180, 0.2);
    border-top: 4px solid #20f0b4;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.container {
    width: 100%;
    max-width: 400px;
    padding: 30px 20px 20px 20px; /* 增加顶部内边距，让内容不要贴死屏幕边缘 */
    box-sizing: border-box;
    position: relative;
    margin: 0 auto; /* 移除 auto 的垂直居中，让内容自然靠上 */
}

/* Background grid/dots decoration */
body::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: radial-gradient(rgba(255,255,255,0.05) 2px, transparent 2px);
    background-size: 15px 15px;
    z-index: 0;
    pointer-events: none;
}

header, main {
    position: relative;
    z-index: 1;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    position: relative;
    z-index: 1000;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    color: #000;
    padding: 6px 12px 6px 6px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 13px;
}

.logo-icon {
    width: 20px;
    height: 20px;
    background: #000;
    border-radius: 4px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2px;
    padding: 3px;
    box-sizing: border-box;
}
.logo-icon span {
    background: #fff;
    border-radius: 1px;
}

.lang-btn {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    color: #fff;
    padding: 6px 14px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    cursor: pointer;
}

.main-title {
    font-size: 34px;
    font-weight: 800;
    text-align: center;
    margin: 0 0 15px 0;
    line-height: 1.1;
    letter-spacing: -0.5px;
}

.subtitle {
    text-align: center;
    font-size: 15px;
    color: #a0b0a8;
    line-height: 1.5;
    margin-bottom: 40px;
    padding: 0 10px;
}

.wheel-container {
    position: relative;
    width: 300px;
    height: 300px;
    margin: 0 auto 50px auto;
}

/* Faint crosshairs/circles in background */
.wheel-bg-circle {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 360px;
    height: 360px;
    border: 1px solid rgba(32, 240, 180, 0.1);
    border-radius: 50%;
    z-index: 0;
}
.wheel-bg-line {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 400px;
    height: 1px;
    background: rgba(32, 240, 180, 0.1);
    z-index: 0;
}
.wheel-bg-line.vertical {
    transform: translate(-50%, -50%) rotate(90deg);
}

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

.wheel {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: conic-gradient(
        from -22.5deg,
        #1a1a1a 0deg 45deg,
        #20f0b4 45deg 90deg,
        #1a1a1a 90deg 135deg,
        #20f0b4 135deg 180deg,
        #1a1a1a 180deg 225deg,
        #20f0b4 225deg 270deg,
        #1a1a1a 270deg 315deg,
        #20f0b4 315deg 360deg
    );
    border: 8px solid #111;
    box-shadow: 0 0 0 6px #20f0b4, 0 0 30px rgba(32, 240, 180, 0.2);
    position: relative;
    box-sizing: border-box;
    transition: transform 4s cubic-bezier(0.17, 0.67, 0.12, 0.99);
}

.segment {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transform: rotate(calc(var(--i) * 45deg));
    z-index: 2;
}

.text {
    position: absolute;
    top: 30px; /* 控制文字距离边缘的距离 */
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    font-size: 18px;
    font-weight: 900;
    line-height: 1.1;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.text small {
    font-size: 10px;
    font-weight: 600;
    margin-top: 2px;
}

.segment:nth-child(odd) .text {
    color: #ccc;
}
.segment:nth-child(even) .text {
    color: #000;
}

.center-circle {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 70px;
    height: 70px;
    background: #000;
    border-radius: 50%;
    border: 3px solid #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #fff;
    font-weight: 900;
    font-size: 20px;
    z-index: 5;
}

.spin-btn {
    width: 100%;
    background: #20f0b4;
    color: #000;
    border: none;
    border-radius: 40px;
    padding: 18px 20px;
    font-size: 18px;
    font-weight: 800;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    transition: transform 0.1s, opacity 0.3s;
    margin-bottom: 20px;
}

.spin-btn:active {
    transform: scale(0.98);
}

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

.spin-btn span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.support-icon {
    position: absolute;
    right: 25px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Modal styles */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}
.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}
.modal-content {
    background: #111;
    border: 2px solid #20f0b4;
    border-radius: 20px;
    padding: 30px;
    text-align: center;
    max-width: 320px;
    width: 90%;
    box-sizing: border-box;
    transform: scale(0.9);
    transition: transform 0.3s, opacity 0.3s;
    margin: 0;
    opacity: 0;
}
.modal-overlay.active .modal-content {
    transform: scale(1);
    opacity: 1;
}
.modal-title {
    font-size: 24px;
    font-weight: 800;
    color: #20f0b4;
    margin-bottom: 20px;
    line-height: 1.3;
}
.modal-text {
    font-size: 16px;
    color: #fff;
    margin-bottom: 25px;
}
.usdt-input {
    width: 100%;
    padding: 12px;
    margin-bottom: 20px;
    border-radius: 8px;
    border: 1px solid #20f0b4;
    background: rgba(0,0,0,0.3);
    color: #fff;
    box-sizing: border-box;
    outline: none;
    font-size: 14px;
    text-align: center;
}
.usdt-input:focus {
    box-shadow: 0 0 8px rgba(32, 240, 180, 0.5);
}
.modal-btn {
    background: #20f0b4;
    color: #000;
    border: none;
    padding: 12px 30px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 16px;
    cursor: pointer;
    width: 100%;
    transition: opacity 0.3s;
}
.modal-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Language Dropdown Styles */
.lang-dropdown-container {
    position: relative;
    z-index: 1001;
}
.lang-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    background: #111;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    overflow: hidden;
    display: none;
    flex-direction: column;
    min-width: 100px;
    z-index: 1001;
    box-shadow: 0 4px 12px rgba(0,0,0,0.5);
}
.lang-dropdown.show {
    display: flex;
}
.lang-option {
    padding: 10px 15px;
    font-size: 13px;
    cursor: pointer;
    transition: background 0.2s;
    text-align: center;
}
.lang-option:hover {
    background: rgba(32, 240, 180, 0.2);
    color: #20f0b4;
}