* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background: #f0f0f0;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

h1 {
    text-align: center;
    margin-bottom: 30px;
    color: #ff5e62;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.1);
}

.gacha-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 50px;
}

.cards-container {
    width: 300px;
    height: 450px;
    position: relative;
    margin-bottom: 20px;
    perspective: 1000px;
}

#animation-container {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
}

#result-card {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    border-radius: 15px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
    overflow: hidden;
    backface-visibility: hidden;
    transform-style: preserve-3d;
}

#result-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.hidden {
    display: none;
}

.card {
    width: 300px;
    height: 450px;
    position: absolute;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    overflow: hidden;
    backface-visibility: hidden;
    transform-style: preserve-3d;
}

.card-back {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #ff6b6b, #ffa6a6);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    font-weight: bold;
}

#draw-button {
    padding: 15px 40px;
    background: linear-gradient(135deg, #ff5e62, #ff9966);
    border: none;
    border-radius: 50px;
    color: white;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(255, 94, 98, 0.4);
    transition: all 0.3s ease;
}

#draw-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(255, 94, 98, 0.5);
}

#draw-button:disabled {
    opacity: 0.6;
    transform: none;
    cursor: not-allowed;
}

.collection-section {
    padding: 20px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.collection-section h2 {
    text-align: center;
    margin-bottom: 20px;
    color: #555;
}

.collection-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 15px;
}

.collection-card {
    height: 210px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.collection-card:hover {
    transform: translateY(-5px);
}

.collection-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.rare {
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.6);
}

.uncommon {
    box-shadow: 0 0 15px rgba(192, 192, 192, 0.6);
}

.common {
    box-shadow: 0 0 10px rgba(173, 216, 230, 0.6);
}

@media (max-width: 768px) {
    .collection-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }
    
    .collection-card {
        height: 150px;
    }
}
/* 카드 덱 및 카드 관련 스타일 */
.cards-container {
    width: 300px;
    height: 450px;
    position: relative;
    margin-bottom: 20px;
    perspective: 1500px;
}

#animation-container {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    perspective-origin: center;
}

.card-deck {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
}

.card {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 15px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    overflow: hidden;
    backface-visibility: hidden;
    transform-style: preserve-3d;
    background: white;
    /* 실제 카드처럼 테두리 추가 */
    border: 1px solid rgba(0,0,0,0.1);
}

.card-back {
    width: 100%;
    height: 100%;
    /* 실제 카드 디자인처럼 그라데이션과 패턴 */
    background: linear-gradient(135deg, #ff6b6b, #ffa6a6);
    /* 패턴 추가 (선택사항) */
    background-image: 
        linear-gradient(45deg, rgba(255,255,255,0.1) 25%, transparent 25%, transparent 50%, 
        rgba(255,255,255,0.1) 50%, rgba(255,255,255,0.1) 75%, transparent 75%, transparent);
    background-size: 10px 10px;
    border-radius: 15px;
    /* 카드 뒷면에 로고나 디자인 추가 (가상 요소 사용) */
    position: relative;
}

.card-back::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    height: 80%;
    background-image: url('images/card34.png'); /* 로고 이미지 경로 */
    background-repeat: no-repeat;
    background-position: center;
    opacity: 0.6;
}

/* 카드 단면 효과를 위한 스타일 */
.card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,0.1);
    z-index: 2;
    border-radius: 15px;
    box-shadow: inset 0 0 5px rgba(255,255,255,0.3);
}

/* 카드 뽑기 버튼 스타일 개선 */
#draw-button {
    padding: 15px 40px;
    background: linear-gradient(135deg, #ff5e62, #ff9966);
    border: none;
    border-radius: 50px;
    color: white;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(255, 94, 98, 0.4);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

#draw-button::before {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.3) 0%, rgba(255,255,255,0) 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

#draw-button:hover::before {
    opacity: 1;
}

#draw-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(255, 94, 98, 0.5);
}

#draw-button:active {
    transform: translateY(-1px);
    box-shadow: 0 5px 10px rgba(255, 94, 98, 0.4);
}