* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
}

h1 {
    text-align: center;
    margin-bottom: 30px;
    color: #8e44ad;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.gacha-area {
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    padding: 20px;
    margin-bottom: 30px;
}

.cards-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    min-height: 200px;
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 8px;
    margin-bottom: 20px;
    position: relative;
    overflow: visible;
}

.card {
    width: 120px;
    height: 180px;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    font-weight: bold;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    background-color: #2c3e50;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="none"><path fill="rgba(255,255,255,0.07)" d="M0,0 L100,0 L100,100 L0,100 Z" /></svg>');
    background-size: cover;
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
}

.card.ssr {
    border: 2px solid #f7d068;
    background-color: #8e44ad;
    background-image: 
        url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="none"><path fill="rgba(247,208,104,0.1)" d="M0,0 L100,0 L100,100 L0,100 Z" /></svg>'),
        url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100"><circle cx="50" cy="50" r="40" fill="none" stroke="rgba(247,208,104,0.2)" stroke-width="4" /></svg>');
    background-size: cover, 40px 40px;
    background-position: center, center;
}

.card.sr {
    border: 2px solid #3498db;
    background-color: #2980b9;
    background-image: 
        url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="none"><path fill="rgba(52,152,219,0.1)" d="M0,0 L100,0 L100,100 L0,100 Z" /></svg>'),
        url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100"><rect x="25" y="25" width="50" height="50" fill="none" stroke="rgba(52,152,219,0.2)" stroke-width="2" /></svg>');
    background-size: cover, 30px 30px;
    background-position: center, center;
}

.card.r {
    border: 2px solid #bdc3c7;
    background-color: #7f8c8d;
    background-image: 
        url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="none"><path fill="rgba(189,195,199,0.1)" d="M0,0 L100,0 L100,100 L0,100 Z" /></svg>'),
        url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100"><line x1="25" y1="25" x2="75" y2="75" stroke="rgba(189,195,199,0.2)" stroke-width="2" /><line x1="75" y1="25" x2="25" y2="75" stroke="rgba(189,195,199,0.2)" stroke-width="2" /></svg>');
    background-size: cover, 20px 20px;
    background-position: center, center;
}

.card::before {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        to bottom right,
        rgba(255, 255, 255, 0.3),
        rgba(255, 255, 255, 0.05)
    );
    transform: rotate(-45deg);
    pointer-events: none;
}

.card .rarity {
    font-size: 24px;
    margin-bottom: 10px;
}

.card .name {
    font-size: 16px;
    text-align: center;
    padding: 0 10px;
}

.controls {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
}

.draw-btn {
    padding: 12px 24px;
    background-color: #8e44ad;
    color: white;
    border: none;
    border-radius: 30px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.draw-btn:hover {
    background-color: #9b59b6;
    transform: translateY(-2px);
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15);
}

.draw-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.result-area {
    text-align: center;
    padding: 10px;
    min-height: 50px;
    font-size: 18px;
}

.card-info {
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    padding: 20px;
}

.card-info h2 {
    text-align: center;
    margin-bottom: 15px;
    color: #333;
}

.card-info ul {
    list-style-type: none;
    display: flex;
    justify-content: space-around;
}

.card-info li {
    padding: 10px;
    border-radius: 5px;
    background-color: #f9f9f9;
    font-weight: bold;
}

span.ssr {
    color: #f7d068;
}

span.sr {
    color: #3498db;
}

span.r {
    color: #7f8c8d;
}

@keyframes cardReveal {
    0% {
        transform: rotateY(90deg) scale(0.5);
        opacity: 0;
    }
    100% {
        transform: rotateY(0) scale(1);
        opacity: 1;
    }
}

.card.reveal {
    animation: cardReveal 0.5s ease forwards;
}

.custom-rates {
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    padding: 20px;
    margin-bottom: 30px;
}

.custom-rates h2 {
    text-align: center;
    margin-bottom: 15px;
    color: #333;
}

.rate-inputs {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    gap: 15px;
    margin-bottom: 15px;
}

.rate-input {
    display: flex;
    align-items: center;
    background-color: #f9f9f9;
    padding: 10px 15px;
    border-radius: 5px;
}

.rate-input label {
    margin-right: 10px;
    font-weight: bold;
}

.rate-input input {
    width: 60px;
    padding: 5px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-align: center;
    font-size: 16px;
}

.rate-error {
    color: #e74c3c;
    text-align: center;
    font-weight: bold;
    min-height: 24px;
    margin-bottom: 10px;
}

.apply-btn {
    display: block;
    margin: 0 auto;
    padding: 10px 20px;
    background-color: #2ecc71;
    color: white;
    border: none;
    border-radius: 30px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.apply-btn:hover {
    background-color: #27ae60;
    transform: translateY(-2px);
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15);
}

.apply-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.theme-selector {
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    padding: 20px;
    margin-bottom: 30px;
}

.theme-selector h2 {
    text-align: center;
    margin-bottom: 20px;
    color: #333;
}

.theme-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-bottom: 15px;
}

.theme-btn {
    padding: 8px 15px;
    background-color: #ecf0f1;
    color: #333;
    border: 2px solid #bdc3c7;
    border-radius: 20px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.theme-btn:hover {
    background-color: #d6dcde;
    transform: translateY(-2px);
}

.theme-btn.active {
    background-color: #9b59b6;
    color: white;
    border-color: #8e44ad;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.current-theme {
    text-align: center;
    font-weight: bold;
    color: #8e44ad;
    margin-top: 10px;
}

#themeAll.active { background-color: #9b59b6; border-color: #8e44ad; }
#themeMythology.active { background-color: #e67e22; border-color: #d35400; }
#themeSpace.active { background-color: #3498db; border-color: #2980b9; }
#themeFood.active { background-color: #e74c3c; border-color: #c0392b; }
#themeHero.active { background-color: #2ecc71; border-color: #27ae60; }
#themeAnimal.active { background-color: #f1c40f; border-color: #f39c12; }
#themeFootball.active { background-color: #1abc9c; border-color: #16a085; }

.card .description {
    font-size: 12px;
    text-align: center;
    padding: 0 8px;
    margin-top: 5px;
    font-weight: normal;
    opacity: 0.9;
    height: 50px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card .card-theme {
    position: absolute;
    top: 5px;
    right: 5px;
    font-size: 10px;
    background-color: rgba(255, 255, 255, 0.3);
    padding: 2px 5px;
    border-radius: 10px;
    font-weight: normal;
}

/* 移除主题特定的背景 */
.card[class*='mythology'],
.card[class*='space'],
.card[class*='food'],
.card[class*='hero'],
.card[class*='animal'] {
    background-image: none;
}

/* 主题颜色标识 */
.card[data-theme='mythology'] .card-theme {
    background-color: rgba(230, 126, 34, 0.7);
}

.card[data-theme='space'] .card-theme {
    background-color: rgba(52, 152, 219, 0.7);
}

.card[data-theme='food'] .card-theme {
    background-color: rgba(231, 76, 60, 0.7);
}

.card[data-theme='hero'] .card-theme {
    background-color: rgba(46, 204, 113, 0.7);
}

.card[data-theme='animal'] .card-theme {
    background-color: rgba(241, 196, 15, 0.7);
}

.card[data-theme='mixed'] .card-theme {
    background-color: rgba(155, 89, 182, 0.7);
}

.card[data-theme='football'] .card-theme {
    background-color: rgba(26, 188, 156, 0.7);
}

/* SSR卡片特效 */
@keyframes ssrGlow {
    0% { box-shadow: 0 0 5px 2px rgba(247, 208, 104, 0.5); }
    50% { box-shadow: 0 0 20px 10px rgba(247, 208, 104, 0.8); }
    100% { box-shadow: 0 0 5px 2px rgba(247, 208, 104, 0.5); }
}

@keyframes ssrShineStar {
    0% { opacity: 0; transform: scale(0.1) rotate(0deg); }
    50% { opacity: 1; transform: scale(1.2) rotate(180deg); }
    100% { opacity: 0; transform: scale(0.1) rotate(360deg); }
}

@keyframes ssrBackground {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.card.ssr.reveal {
    animation: cardReveal 0.5s ease forwards, ssrGlow 2s infinite 0.5s;
}

.card.ssr::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, 
        rgba(255, 215, 0, 0) 0%, 
        rgba(255, 215, 0, 0.3) 50%, 
        rgba(255, 215, 0, 0) 100%);
    background-size: 200% 200%;
    animation: ssrBackground 3s ease infinite;
    border-radius: 10px;
    pointer-events: none;
}

/* 星星特效 */
.star {
    position: absolute;
    width: 20px;
    height: 20px;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%23f7d068"><path d="M12 17.27L18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z"/></svg>');
    background-size: contain;
    pointer-events: none;
    opacity: 0;
}

/* 豪华特效容器 */
.luxury-effect {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    pointer-events: none;
    perspective: 1000px;
}

.luxury-effect-text {
    font-size: 60px;
    font-weight: bold;
    text-shadow: 0 0 20px gold, 0 0 30px orange;
    color: #fff;
    opacity: 0;
    transform: scale(0.5) rotate(-10deg);
    animation: luxuryTextAnim 2s forwards;
}

.super-luxury-effect-text {
    font-size: 80px;
    font-weight: bold;
    background: linear-gradient(to right, #ff8a00, #da1b60, #8a2be2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 20px rgba(255, 138, 0, 0.7);
    opacity: 0;
    transform: scale(0.5);
    animation: superLuxuryTextAnim 3s forwards;
}

@keyframes luxuryTextAnim {
    0% { opacity: 0; transform: scale(0.5) rotate(-10deg); }
    10% { opacity: 1; transform: scale(1.2) rotate(5deg); }
    20% { transform: scale(1) rotate(-3deg); }
    30% { transform: scale(1.1) rotate(3deg); }
    40% { transform: scale(1) rotate(0); }
    80% { opacity: 1; }
    100% { opacity: 0; transform: scale(2) rotate(0); }
}

@keyframes superLuxuryTextAnim {
    0% { opacity: 0; transform: scale(0.5) rotate(0); }
    10% { opacity: 1; transform: scale(1.5); }
    20% { transform: scale(1.2); }
    40% { transform: scale(1.3); }
    60% { transform: scale(1.2); }
    80% { opacity: 1; }
    100% { opacity: 0; transform: scale(3); }
}

/* 闪光粒子 */
.particles-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9998;
}

.particle {
    position: absolute;
    background: radial-gradient(circle, rgba(255,255,255,0.8) 0%, rgba(255,255,255,0) 70%);
    border-radius: 50%;
    pointer-events: none;
}

/* 彩带特效 */
.confetti {
    position: absolute;
    width: 10px;
    height: 20px;
    opacity: 0.7;
    pointer-events: none;
} 