* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    overflow-x: hidden;
}

.container {
    width: 100%;
    min-height: 100vh;
    padding-bottom: 60px;
}

.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 12px 16px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    justify-content: center;
    align-items: center;
    max-width: 600px;
    margin: 0 auto;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo-icon {
    font-size: 28px;
}

.logo-text {
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.main-content {
    padding: 20px 16px;
    max-width: 600px;
    margin: 0 auto;
}

.lottery-section {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 24px;
    margin-bottom: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.lottery-container {
    position: relative;
    width: 100%;
    max-width: 320px;
    margin: 0 auto;
}

.wheel-container {
    position: relative;
    width: 100%;
    padding-bottom: 100%;
}

.wheel-pointer {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 20;
    transition: transform 0.5s cubic-bezier(0.25, 0.1, 0.25, 1);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(145deg, #FF6B6B, #EE5A5A);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.5);
}

.pointer-arrow {
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-bottom: 20px solid #fff;
    position: absolute;
    top: -5px;
    left: 50%;
    transform: translateX(-50%);
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.wheel {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: linear-gradient(145deg, #f8f8f8, #e0e0e0);
    box-shadow: 
        0 0 0 8px #fff,
        0 0 0 12px #FF6B6B,
        0 10px 30px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

.wheel {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: linear-gradient(145deg, #f8f8f8, #e0e0e0);
    box-shadow: 
        0 0 0 8px #fff,
        0 0 0 12px #FF6B6B,
        0 10px 30px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

.wheel-segments {
    position: absolute;
    width: 100%;
    height: 100%;
}

.segment {
    position: absolute;
    width: 50%;
    height: 50%;
    transform-origin: bottom right;
    clip-path: polygon(0 0, 100% 0, 100% 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.segment-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transform: rotate(45deg);
    gap: 2px;
}

.segment-icon {
    font-size: 24px;
    line-height: 1;
}

.segment-text {
    font-size: 11px;
    font-weight: 600;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    text-align: center;
    max-width: 50px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transform: rotate(180deg);
}

.lottery-btn {
    width: 100%;
    max-width: 200px;
    height: 56px;
    margin: 24px auto 0;
    display: block;
    background: linear-gradient(135deg, #FF6B6B, #EE5A5A);
    border: none;
    border-radius: 28px;
    color: #fff;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.4);
}

.lottery-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 107, 107, 0.5);
}

.lottery-btn:active:not(:disabled) {
    transform: translateY(0);
}

.lottery-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    box-shadow: none;
    opacity: 0.6;
}

.btn-text {
    position: relative;
    z-index: 1;
}

.btn-glow {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: glow 2s infinite;
}

@keyframes glow {
    0% { left: -100%; }
    100% { left: 100%; }
}

.prize-display {
    margin-top: 20px;
    padding: 16px;
    background: linear-gradient(135deg, #FFF9C4, #FFECB3);
    border-radius: 12px;
    text-align: center;
    display: none;
}

.prize-display.show {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.prize-icon {
    font-size: 48px;
    margin-bottom: 8px;
}

.prize-name {
    font-size: 20px;
    font-weight: 700;
    color: #E65100;
    margin-bottom: 4px;
}

.prize-desc {
    font-size: 14px;
    color: #795548;
}

.footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    padding: 12px;
    text-align: center;
    font-size: 12px;
    color: #999;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    padding: 20px;
}

.modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: #fff;
    border-radius: 16px;
    width: 100%;
    max-width: 360px;
    overflow: hidden;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.modal-overlay.show .modal {
    transform: scale(1);
}

.modal-header {
    padding: 16px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    text-align: center;
    position: relative;
}

.modal-header h3 {
    font-size: 18px;
    font-weight: 600;
}

.modal-close {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    line-height: 1;
}

.modal-body {
    padding: 16px;
    max-height: 60vh;
    overflow-y: auto;
}

.map-container {
    width: 100%;
}

.map-placeholder {
    text-align: center;
}

.map-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 12px;
}

.map-icon {
    font-size: 20px;
}

.map-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.map-image {
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.map-image img {
    width: 100%;
    height: auto;
    display: block;
}

.map-info {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 12px;
}

.info-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 8px;
    font-size: 14px;
}

.info-item:last-child {
    margin-bottom: 0;
}

.info-label {
    color: #666;
    flex-shrink: 0;
}

.info-value {
    color: #333;
    flex: 1;
}

.map-link {
    display: inline-block;
    margin-top: 12px;
    padding: 10px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    text-decoration: none;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.map-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.modal-footer {
    padding: 16px 20px;
    border-top: 1px solid #eee;
}

.modal-btn {
    width: 100%;
    height: 48px;
    border: none;
    border-radius: 24px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.confirm-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}

.confirm-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

@media (max-width: 480px) {
    .header {
        padding: 10px 12px;
    }
    
    .logo-text {
        font-size: 16px;
    }
    
    .main-content {
        padding: 16px 12px;
    }
    
    .lottery-section {
        padding: 16px;
    }
    
    .wheel-pointer {
        width: 50px;
        height: 50px;
    }
    
    .pointer-arrow {
        border-left-width: 8px;
        border-right-width: 8px;
        border-bottom-width: 16px;
    }
    
    .segment-icon {
        font-size: 20px;
    }
    
    .segment-text {
        font-size: 9px;
        max-width: 40px;
    }
    
    .lottery-btn {
        height: 50px;
        font-size: 16px;
    }
    
    .modal {
        max-width: 100%;
        margin: 10px;
    }
}