/* 10+1 뽑기 화면 스타일 */
.multi-gacha-screen {
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    flex-direction: column;
}

/* 헤더 */
.multi-gacha-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.multi-gacha-title {
    color: var(--white);
    font-size: 20px;
    font-weight: 700;
    margin: 0;
}

.multi-gacha-info {
    font-size: 14px;
    font-weight: 500;
}

.bonus-text {
    color: #FFD700;
    background: rgba(255, 215, 0, 0.2);
    padding: 4px 12px;
    border-radius: 12px;
    font-weight: 600;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

/* 진행 상태 */
.progress-section {
    padding: 20px;
    text-align: center;
}

.progress-info {
    color: var(--white);
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 12px;
}

.current-count {
    color: #FFD700;
    font-size: 20px;
    font-weight: 700;
}

.total-count {
    color: rgba(255, 255, 255, 0.8);
}

.progress-label {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
}

.progress-bar-container {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #FFD700, #FFA500);
    border-radius: 4px;
    width: 0%;
    transition: width 0.5s ease;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

/* 결과 그리드 */
.results-grid {
    flex: 1;
    padding: 20px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 12px;
    max-width: 600px;
    margin: 0 auto;
    width: 100%;
}

.result-slot {
    aspect-ratio: 1;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius-lg);
    border: 2px solid rgba(255, 255, 255, 0.2);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.result-slot:hover:not(.revealing) {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

.result-slot.revealing {
    animation: slot-revealing 0.8s ease-out;
}

.result-slot.revealed {
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(255, 255, 255, 0.8);
}

.result-slot.revealed:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.slot-inner {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.slot-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.7);
    text-align: center;
}

.slot-number {
    font-size: 14px;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.2);
    padding: 4px 8px;
    border-radius: 8px;
}

.slot-box {
    font-size: 32px;
    animation: float 2s ease-in-out infinite;
}

.slot-result {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
}

.result-item {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    border-radius: var(--border-radius);
}

.result-item.grade-1 {
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.1), rgba(255, 107, 107, 0.05));
}

.result-item.grade-2 {
    background: linear-gradient(135deg, rgba(255, 217, 61, 0.1), rgba(255, 217, 61, 0.05));
}

.result-item.grade-3 {
    background: linear-gradient(135deg, rgba(107, 207, 127, 0.1), rgba(107, 207, 127, 0.05));
}

.result-item.grade-4 {
    background: linear-gradient(135deg, rgba(78, 205, 196, 0.1), rgba(78, 205, 196, 0.05));
}

.result-item.grade-5 {
    background: linear-gradient(135deg, rgba(149, 165, 166, 0.1), rgba(149, 165, 166, 0.05));
}

.item-grade-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    font-size: 8px;
    font-weight: 700;
    color: var(--white);
    padding: 2px 6px;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.item-icon {
    font-size: 24px;
    margin: 4px 0;
}

.item-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
}

.item-name {
    font-size: 11px;
    font-weight: 600;
    color: var(--dark-color);
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.item-value {
    font-size: 10px;
    color: var(--primary-gradient-end);
    font-weight: 700;
}

.rare-badge {
    position: absolute;
    top: -5px;
    left: -5px;
    font-size: 16px;
    animation: sparkle 2s infinite;
}

/* 특별 효과 */
.result-slot.special-effect {
    position: relative;
    overflow: visible;
}

.result-slot.legendary-effect::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, 
        #ff0000, #ff7f00, #ffff00, #00ff00, 
        #0000ff, #4b0082, #9400d3, #ff0000);
    border-radius: var(--border-radius-lg);
    z-index: -1;
    animation: rainbow-border 2s linear infinite;
    background-size: 400% 400%;
}

.result-slot.epic-effect::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #FFD700, #FFA500, #FFD700);
    border-radius: var(--border-radius-lg);
    z-index: -1;
    animation: golden-glow 1.5s ease-in-out infinite;
}

.result-slot.completion-glow {
    animation: completion-pulse 1s ease-out;
}

/* 상태 섹션 */
.status-section {
    padding: 20px;
    text-align: center;
}

.status-message {
    color: var(--white);
    font-size: 16px;
    font-weight: 500;
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
}

.status-message.celebration {
    background: rgba(40, 167, 69, 0.2);
    border-color: #28a745;
    color: #90EE90;
    animation: celebration-glow 2s infinite;
}

.status-message.error {
    background: rgba(220, 53, 69, 0.2);
    border-color: #dc3545;
    color: #FFB6C1;
}

/* 액션 섹션 */
.actions-section {
    padding: 20px;
}

.action-btn {
    position: relative;
    overflow: hidden;
}

.action-btn:disabled {
    background: #999;
    cursor: not-allowed;
    transform: none !important;
}

/* 하단 정보 */
.bottom-info {
    background: var(--white);
    border-radius: var(--border-radius-lg) var(--border-radius-lg) 0 0;
    padding: 20px;
}

.info-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.info-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: #f8f9fa;
    border-radius: var(--border-radius);
    border: 1px solid #e9ecef;
}

.info-icon {
    font-size: 24px;
    min-width: 32px;
    text-align: center;
}

.info-text {
    flex: 1;
    min-width: 0;
}

.info-title {
    font-size: 12px;
    color: #666;
    margin-bottom: 2px;
}

.info-value {
    font-size: 14px;
    font-weight: 700;
    color: var(--dark-color);
}

/* 상세 모달 */
.result-detail-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    padding: 20px;
}

.result-detail-modal.show {
    opacity: 1;
    pointer-events: all;
}

.modal-content {
    background: var(--white);
    border-radius: var(--border-radius-lg);
    max-width: 400px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.result-detail-modal.show .modal-content {
    transform: scale(1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #eee;
}

.modal-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--dark-color);
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s ease;
}

.modal-close:hover {
    background: #f0f0f0;
}

.modal-body {
    padding: 20px;
}

.modal-result {
    text-align: center;
}

.modal-slot-number {
    font-size: 14px;
    color: #666;
    margin-bottom: 12px;
}

.modal-grade-badge {
    display: inline-block;
    color: var(--white);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 16px;
}

.modal-item-icon {
    font-size: 64px;
    margin: 20px 0;
}

.modal-item-info {
    margin-bottom: 24px;
}

.modal-item-name {
    font-size: 20px;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 8px;
}

.modal-item-value {
    font-size: 18px;
    color: var(--primary-gradient-end);
    font-weight: 700;
    margin-bottom: 8px;
}

.modal-item-description {
    font-size: 14px;
    color: #666;
}

.modal-actions {
    text-align: center;
}

.modal-btn {
    padding: 12px 24px;
    border: none;
    border-radius: var(--border-radius);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.modal-btn.btn-primary {
    background: var(--primary-gradient-end);
    color: var(--white);
}

.modal-btn:hover {
    transform: translateY(-1px);
}

/* 애니메이션 */
@keyframes slot-revealing {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1) rotateY(90deg);
    }
    100% {
        transform: scale(1) rotateY(0deg);
    }
}

@keyframes result-appear {
    from {
        opacity: 0;
        transform: scale(0.8) rotateY(90deg);
    }
    to {
        opacity: 1;
        transform: scale(1) rotateY(0deg);
    }
}

@keyframes rainbow-border {
    0% {
        background-position: 0% 50%;
    }
    100% {
        background-position: 400% 50%;
    }
}

@keyframes golden-glow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
    }
    50% {
        box-shadow: 0 0 30px rgba(255, 215, 0, 0.8);
    }
}

@keyframes completion-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 215, 0, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(255, 215, 0, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(255, 215, 0, 0);
    }
}

@keyframes celebration-glow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(40, 167, 69, 0.3);
    }
    50% {
        box-shadow: 0 0 30px rgba(40, 167, 69, 0.6);
    }
}

/* 모바일 최적화 */
@media (max-width: 768px) {
    .multi-gacha-header {
        padding: 16px;
    }
    
    .multi-gacha-title {
        font-size: 18px;
    }
    
    .progress-section {
        padding: 16px;
    }
    
    .progress-info {
        font-size: 14px;
    }
    
    .current-count {
        font-size: 18px;
    }
    
    .results-grid {
        padding: 16px;
        gap: 8px;
        grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    }
    
    .slot-number {
        font-size: 12px;
        padding: 2px 6px;
    }
    
    .slot-box {
        font-size: 24px;
    }
    
    .item-icon {
        font-size: 18px;
    }
    
    .item-name {
        font-size: 10px;
    }
    
    .item-value {
        font-size: 9px;
    }
    
    .item-grade-badge {
        font-size: 7px;
        padding: 1px 4px;
    }
    
    .status-section {
        padding: 16px;
    }
    
    .status-message {
        font-size: 14px;
        padding: 10px 16px;
    }
    
    .actions-section {
        padding: 16px;
    }
    
    .bottom-info {
        padding: 16px;
    }
    
    .info-cards {
        gap: 8px;
    }
    
    .info-card {
        padding: 12px;
        gap: 8px;
        flex-direction: column;
        text-align: center;
    }
    
    .info-icon {
        font-size: 20px;
    }
    
    .info-title {
        font-size: 11px;
    }
    
    .info-value {
        font-size: 13px;
    }
    
    .modal-content {
        margin: 10px;
        max-height: calc(100vh - 20px);
    }
    
    .modal-header,
    .modal-body {
        padding: 16px;
    }
    
    .modal-item-icon {
        font-size: 48px;
        margin: 16px 0;
    }
    
    .modal-item-name {
        font-size: 18px;
    }
    
    .modal-item-value {
        font-size: 16px;
    }
}

@media (max-width: 375px) {
    .results-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .info-cards {
        grid-template-columns: 1fr;
    }
    
    .info-card {
        flex-direction: row;
        text-align: left;
    }
}

/* 접근성 */
@media (prefers-reduced-motion: reduce) {
    .result-slot,
    .slot-box,
    .progress-bar,
    .rare-badge,
    .modal-content {
        animation: none !important;
        transition: none !important;
    }
    
    .result-slot.legendary-effect::before,
    .result-slot.epic-effect::before {
        animation: none !important;
    }
}

/* 다크 모드 */
@media (prefers-color-scheme: dark) {
    .result-slot.revealed {
        background: rgba(52, 73, 94, 0.95);
    }
    
    .item-name {
        color: var(--white);
    }
    
    .bottom-info {
        background: #2c3e50;
        color: var(--white);
    }
    
    .info-card {
        background: #34495e;
        border-color: #495057;
        color: var(--white);
    }
    
    .info-title {
        color: #adb5bd;
    }
    
    .info-value {
        color: var(--white);
    }
    
    .modal-content {
        background: #2c3e50;
        color: var(--white);
    }
    
    .modal-header {
        border-bottom-color: #495057;
    }
    
    .modal-title,
    .modal-item-name {
        color: var(--white);
    }
    
    .modal-close:hover {
        background: #495057;
    }
}