/* 모던 디자인 변수 호환 */
/* common-modern.css의 변수를 사용하여 다크모드 및 테마 호환성 확보 */

/* 유저 확률표 페이지 전용 스타일 */

.hidden { 
    display: none !important; 
}

/* 모달이 처음부터 보이지 않도록 확실히 */
#uploadModal {
    display: none !important;
}

#uploadModal.show,
#uploadModal.modal.show {
    display: block !important;
}

/* 모달 백드롭 */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1040;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.5);
}

/* 모달 중앙 정렬 */
#uploadModal.modal {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1050;
    width: 100%;
    height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
    outline: 0;
}

#uploadModal .modal-dialog {
    position: relative;
    width: auto;
    margin: 1.75rem auto;
    max-width: 500px;
    pointer-events: none;
    display: flex;
    align-items: center;
    min-height: calc(100% - 3.5rem);
}

#uploadModal.show .modal-dialog {
    pointer-events: auto;
}

/* 업로드 모달 모던 스타일 */
#uploadModal .modal-content {
    background: linear-gradient(135deg, #1a1d2e 0%, #2d3446 100%);
    border: 2px solid rgba(102, 126, 234, 0.2);
    border-radius: 20px;
    padding: 0;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.05);
    overflow: hidden;
}

#uploadModal .modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-bottom: none;
    border-radius: 0;
    padding: 1.75rem 2rem;
    position: relative;
}

#uploadModal .modal-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
}

#uploadModal .modal-title {
    color: #fff;
    font-weight: 700;
    font-size: 1.35rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

#uploadModal .close {
    color: #fff;
    opacity: 0.9;
    text-shadow: none;
    font-size: 1.75rem;
    font-weight: 300;
    transition: all 0.3s ease;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

#uploadModal .close:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
    border-color: rgba(255, 255, 255, 0.4);
}

#uploadModal .modal-body {
    background: transparent;
    padding: 2rem 2.5rem;
}

#uploadModal .form-group label {
    color: #e2e8f0;
    font-weight: 600;
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
}

#uploadModal .form-control {
    background-color: rgba(26, 32, 44, 0.6);
    border: 1.5px solid rgba(102, 126, 234, 0.3);
    color: #fff;
    border-radius: 10px;
    padding: 0.85rem 1rem;
    transition: all 0.3s ease;
}

#uploadModal .form-control:focus {
    background-color: rgba(26, 32, 44, 0.8);
    border-color: #667eea;
    color: #fff;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15), 0 4px 12px rgba(102, 126, 234, 0.2);
    transform: translateY(-1px);
}

#uploadModal .form-control::placeholder {
    color: #718096;
}

#uploadModal .text-muted {
    color: #a0aec0 !important;
}

#uploadModal .form-check-label {
    color: #e2e8f0;
}

#uploadModal .form-check-label a {
    color: #667eea;
    text-decoration: none;
}

#uploadModal .form-check-label a:hover {
    color: #764ba2;
    text-decoration: underline;
}

#uploadModal .modal-footer {
    background-color: #1a202c;
    border-top: 1px solid #4a5568;
    border-radius: 0 0 12px 12px;
    padding: 1rem 1.5rem;
}

#uploadModal .btn-secondary {
    background-color: #4a5568;
    border: none;
    padding: 0.5rem 1.5rem;
}

#uploadModal .btn-secondary:hover {
    background-color: #718096;
}

#uploadModal .btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    padding: 0.5rem 1.5rem;
    font-weight: 500;
}

#uploadModal .btn-primary:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

/* 메인 메뉴 그리드 레이아웃 */
.menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

/* 메뉴 카드 스타일 */
.menu-card {
    background: var(--card-bg, #ffffff);
    border-radius: 16px;
    padding: 2.5rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.menu-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--gradient-start), var(--gradient-end));
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.menu-card:hover::before {
    transform: scaleX(1);
}

.menu-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    border-color: var(--border-color);
}

.menu-card:active {
    transform: translateY(-4px);
}

/* 카드 아이콘 */
.menu-card-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 20px;
    background: var(--icon-bg);
    color: var(--icon-color);
    transition: all 0.3s ease;
}

.menu-card:hover .menu-card-icon {
    transform: scale(1.1) rotate(5deg);
}

/* 카드 제목 */
.menu-card-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--text-primary, #1a202c);
}

/* 카드 설명 */
.menu-card-description {
    font-size: 0.95rem;
    color: var(--text-secondary, #718096);
    line-height: 1.5;
    margin: 0;
}

/* Primary 카드 (파란색) */
.menu-card-primary {
    --gradient-start: #667eea;
    --gradient-end: #764ba2;
    --border-color: #667eea;
    --icon-bg: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --icon-color: #ffffff;
}

/* Success 카드 (초록색) */
.menu-card-success {
    --gradient-start: #10b981;
    --gradient-end: #059669;
    --border-color: #10b981;
    --icon-bg: linear-gradient(135deg, #10b981 0%, #059669 100%);
    --icon-color: #ffffff;
}

/* 다크모드 지원 */
[data-theme="dark"] .menu-card {
    --card-bg: #2d3748;
    --text-primary: #e2e8f0;
    --text-secondary: #a0aec0;
    background: #2d3748;
}

[data-theme="dark"] .menu-card:hover {
    background: #374151;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3), 0 10px 10px -5px rgba(0, 0, 0, 0.2);
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .menu-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .menu-card {
        padding: 2rem 1.5rem;
    }
    
    .menu-card-icon {
        width: 70px;
        height: 70px;
    }
    
    .menu-card-title {
        font-size: 1.15rem;
    }
    
    .menu-card-description {
        font-size: 0.9rem;
    }
}

/* Step 영역 내의 textarea만 스타일 적용 */
.step textarea,
#creatorSection textarea {
    width: 100%;
    height: 250px;
    margin-bottom: 20px;
    padding: 10px;
    border: 1px solid #ced4da;
    border-radius: 4px;
}

/* Step 영역 내의 input만 스타일 적용 */
.step input[type="text"], 
.step input[type="date"],
#creatorSection input[type="text"],
#creatorSection input[type="date"] {
    width: 100%;
    padding: 8px;
    margin-bottom: 10px;
    border: 1px solid #ced4da;
    border-radius: 4px;
}

/* Step 영역 내의 label 스타일 */
.step label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.row-flex {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
}

/* Step 내부 버튼만 스타일 적용 */
.step button {
    margin-top: 10px;
}

.step { 
    margin-bottom: 30px;
    padding: 25px;
    background: var(--surface, #f8f9fa);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* 다크모드에서 Step 스타일 */
body.dark-mode .step,
[data-theme="dark"] .step {
    background: #2d3748;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* ---------- Step2 스타일 (경계 드래그) ---------- */
.boxContainer {
    border: 1px solid #ddd;
    margin-bottom: 40px;
    padding: 10px;
}

.boxTitle {
    font-weight: bold;
    margin-bottom: 10px;
}

.itemList {
    border: 1px solid #ccc;
    max-height: 300px;
    overflow-y: auto;
    position: relative;
}

.itemRow {
    padding: 6px 10px;
}

.item-equip {
    background-color: #a7c8ff; /* 파란색 */
}

.item-nonequip {
    background-color: #ffcaa7; /* 주황색 */
}

.boundary {
    height: 4px;
    background-color: red;
    cursor: ns-resize;
    position: relative;
}

/* ---------- Step3 스타일 (토글 버튼) ---------- */
.boxContainer {
    max-height: 400px;
    overflow-y: auto;
}

.toggleRow {
    padding: 8px 12px;
    margin: 3px 0;
    cursor: pointer;
}

.toggle-true {
    background-color: #7ab0ff;
}

.toggle-false {
    background-color: #ffb88a;
}
