body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
    overflow: hidden;
}

.container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    text-align: center;
    width: 95%;
    max-width: 600px;
    animation: fadeIn 0.8s ease-out;
    max-height: 90vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    will-change: transform;
}

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

h1 {
    color: #5a67d8;
    margin-bottom: 10px;
    font-size: 2.2em;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}

.subtitle {
    color: #718096;
    font-size: 1.1em;
    margin-bottom: 25px;
    font-weight: 400;
    letter-spacing: 0.5px;
}

label {
    display: block;
    margin-top: 15px;
    text-align: left;
    font-weight: 600;
    color: #4a5568;
}

input, select {
    width: 100%;
    padding: 14px;
    margin-top: 8px;
    box-sizing: border-box;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

input:focus, select:focus {
    outline: none;
    border-color: #5a67d8;
    box-shadow: 0 0 0 3px rgba(90, 103, 216, 0.1);
}

button {
    margin-top: 25px;
    padding: 14px 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 17px;
    font-weight: 600;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    width: 100%;
    transform: translateZ(0);
    will-change: transform;
}

button:active {
    transform: translateY(1px) translateZ(0);
}

.store-info {
    margin-top: 20px;
    padding: 15px;
    background: rgba(102, 126, 234, 0.05);
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.store-info p {
    margin: 8px 0;
    color: #4a5568;
    font-size: 14px;
    text-align: left;
    line-height: 1.6;
}

.store-info p.highlight-notice {
    background: linear-gradient(135deg, #ffd700 0%, #ffb347 100%);
    color: #8b4513;
    font-weight: 600;
    padding: 12px 15px;
    border-radius: 8px;
    margin-top: 12px;
    box-shadow: 0 3px 8px rgba(255, 193, 7, 0.3);
    border: 2px solid #ff9800;
}

#result {
    margin-top: 30px;
    padding: 20px;
    border-radius: 10px;
    background: linear-gradient(135deg, #f0f4ff 0%, #e6fffa 100%);
    color: #2d3748;
    font-size: 16px;
    line-height: 1.6;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    animation: slideUp 0.6s ease-out;
    display: none;
    text-align: left;
    max-height: 60vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    will-change: transform, opacity;
}

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

#result.show {
    display: block;
}

.fortune-title {
    color: #5a67d8;
    font-size: 1.5em;
    margin-bottom: 15px;
    font-weight: 700;
}

.fortune-content {
    font-size: 1.1em;
    margin-bottom: 15px;
}

.fortune-details {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 4px 12px rgba(31, 38, 135, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    text-align: left;
    transform: translateZ(0);
    will-change: transform;
}

.zodiac-sign {
    font-size: 2em;
    margin: 10px 0;
}

.lunar-fortune {
    margin-top: 15px;
}

.lunar-fortune h3 {
    color: #5a67d8;
    margin-bottom: 10px;
    font-size: 1.3em;
    text-align: center;
}

.lunar-fortune p {
    margin: 8px 0;
    line-height: 1.5;
}

.lunar-fortune strong {
    color: #4a5568;
}

/* 移动端性能优化 */
@media (max-width: 768px) {
    .container {
        padding: 20px;
        margin: 10px;
        max-height: 95vh;
    }
    
    #result {
        padding: 15px;
        max-height: 70vh;
    }
    
    .fortune-details {
        padding: 15px;
        margin-bottom: 15px;
    }
    
    h1 {
        font-size: 1.8em;
        margin-bottom: 8px;
    }
    
    .subtitle {
        font-size: 0.95em;
        margin-bottom: 20px;
    }
    
    /* 减少动画复杂度 */
    @keyframes fadeIn {
        from { opacity: 0; }
        to { opacity: 1; }
    }
    
    @keyframes slideUp {
        from { opacity: 0; }
        to { opacity: 1; }
    }
}

/* 减少重绘和重排 */
* {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* 优化滚动性能 */
.container, #result {
    contain: layout style paint;
}