* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #ffb6c1 0%, #ffc0cb 50%, #ffd1dc 100%);
    min-height: 100vh;
    overflow-x: hidden;
    overflow-y: auto;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 10px;
}

#container {
    text-align: center;
    padding: 20px;
    position: relative;
    z-index: 1;
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

#title {
    margin-bottom: 30px;
}

#title h1 {
    font-size: 3rem;
    color: #fff;
    text-shadow: 3px 3px 0px #ff69b4, 6px 6px 10px rgba(255, 105, 180, 0.3);
    font-weight: bold;
    letter-spacing: 2px;
}

#draw-card .star {
    font-size: 0.8rem;
    margin-left: 8px;
    vertical-align: middle;
}

#canvas-container {
    width: 100%;
    height: 400px;
    margin: 0 auto 30px;
    position: relative;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(255, 105, 180, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.3);
    overflow: hidden;
    flex-shrink: 0;
}

#controls {
    margin-bottom: 30px;
}

#draw-card {
    background: linear-gradient(45deg, #ff69b4, #ff1493);
    color: white;
    border: none;
    padding: 15px 40px;
    font-size: 1.2rem;
    font-weight: bold;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(255, 105, 180, 0.4);
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

#draw-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(255, 105, 180, 0.6);
    background: linear-gradient(45deg, #ff1493, #ff69b4);
}

#draw-card:active {
    transform: translateY(1px);
    box-shadow: 0 3px 10px rgba(255, 105, 180, 0.4);
}

#card-info {
    background: rgba(255, 255, 255, 0.8);
    padding: 20px;
    border-radius: 20px;
    max-width: 500px;
    width: 100%;
    margin: 0 auto;
    box-shadow: 0 5px 15px rgba(255, 105, 180, 0.2);
    overflow-wrap: break-word;
    word-wrap: break-word;
}

#card-description {
    color: #ff69b4;
    font-size: 1.2rem;
    line-height: 1.6;
    font-weight: 500;
    margin: 0;
    overflow-wrap: break-word;
    word-wrap: break-word;
    white-space: pre-wrap;
    max-width: 100%;
}

/* 响应式设计 - 兼容移动设备 */
@media only screen and (max-width: 768px), only screen and (max-device-width: 768px) {
    body {
        padding: 10px;
        overflow-y: auto;
    }
    
    #container {
        padding: 10px;
    }
    
    #title {
        margin-bottom: 20px;
    }
    
    #title h1 {
        font-size: 2rem;
    }
    
    #canvas-container {
        width: 100%;
        height: 250px;
        margin-bottom: 20px;
        border-radius: 15px;
    }
    
    #controls {
        margin-bottom: 20px;
    }
    
    #draw-card {
        padding: 12px 30px;
        font-size: 1rem;
    }
    
    #card-info {
        padding: 15px;
        max-width: 500px;
        margin: 0 auto;
    }
    
    #card-description {
        font-size: 1rem;
        line-height: 1.5;
    }
}

/* 针对小屏手机的额外优化 - 兼容移动设备 */
@media only screen and (max-width: 480px), only screen and (max-device-width: 480px) {
    #title h1 {
        font-size: 1.8rem;
        text-shadow: 2px 2px 0px #ff69b4, 4px 4px 8px rgba(255, 105, 180, 0.3);
    }
    
    #canvas-container {
        height: 200px;
    }
    
    #draw-card {
        padding: 10px 25px;
        font-size: 0.9rem;
    }
    
    #draw-card .star {
        font-size: 0.7rem;
    }
    
    #card-info {
        padding: 12px;
    }
    
    #card-description {
        font-size: 0.9rem;
    }
}

/* 粒子效果容器 */
.particle-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}