/*
 * 파일명: style.css
 * 위치: /p/ghost-leg/assets/css/style.css
 * 기능: 사다리타기 게임 전용 스타일시트
 * 작성일: 2025-07-26
 * 수정일: 2025-07-26
 */

/* ===================================
 * CSS 변수 정의
 * =================================== */
:root {
    --ghostleg-primary: #667eea;
    --ghostleg-secondary: #764ba2;
    --ghostleg-success: #10b981;
    --ghostleg-danger: #dc3545;
    --ghostleg-warning: #f7b924;
    --ghostleg-info: #4ea8de;
    --ghostleg-light: #f8f9fa;
    --ghostleg-dark: #374151;
    --ghostleg-border: #dee2e6;
    --ghostleg-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
    --ghostleg-transition: all 0.3s ease;
}

/* ===================================
 * 히어로 섹션 스타일
 * =================================== */

/* 메인 히어로 컨테이너 */
.ghostleg-hero {
    background: linear-gradient(135deg, var(--ghostleg-primary) 0%, var(--ghostleg-secondary) 100%);
    border-radius: 20px;
    padding: 2rem;
    text-align: center !important;
    margin-bottom: 2rem;
    color: white;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

/* 히어로 제목 */
.ghostleg-hero .webtools-title {
    color: white !important;
    margin: 0;
    font-size: 2.5rem;
    text-align: center !important;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

/* 히어로 아이콘 */
.ghostleg-hero .webtools-icon {
    color: white !important;
    font-size: 2.5rem;
    margin: 0;
    flex-shrink: 0;
}

/* 히어로 부제목 */
.ghostleg-hero .webtools-subtitle {
    color: rgba(255, 255, 255, 0.95) !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    margin: 1rem auto 0 auto !important;
    font-size: 1.1rem;
    text-align: center !important;
    display: block;
    max-width: 90%;
}

/* ===================================
 * 단계별 진행 가이드
 * =================================== */

/* 진행 가이드 컨테이너 */
.ghostleg-progress-guide {
    background: linear-gradient(135deg, var(--ghostleg-light) 0%, #e9ecef 100%);
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid var(--ghostleg-border);
}

/* 개별 단계 컨테이너 */
.ghostleg-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: var(--ghostleg-transition);
}

/* 단계 번호 원형 */
.ghostleg-step-circle {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.5rem;
    transition: var(--ghostleg-transition);
    position: relative;
}

/* 단계 번호 텍스트 */
.ghostleg-step-circle .step-number {
    color: white;
    font-weight: 600;
    font-size: 1.1rem;
}

/* 단계 완료 체크 아이콘 */
.ghostleg-step-circle .step-check {
    color: white;
    font-size: 1.5rem;
    position: absolute;
}

/* 활성 단계 스타일 */
.ghostleg-step.active .ghostleg-step-circle {
    background: linear-gradient(135deg, var(--primary-color) 0%, #8b5cf6 100%);
    box-shadow: var(--ghostleg-shadow);
}

/* 완료된 단계 스타일 */
.ghostleg-step.completed .ghostleg-step-circle {
    background: linear-gradient(135deg, var(--ghostleg-success) 0%, #059669 100%);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

/* 단계 설명 텍스트 */
.ghostleg-step-text {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--ghostleg-dark);
    text-align: center;
}

/* 활성 단계 텍스트 */
.ghostleg-step.active .ghostleg-step-text {
    color: var(--primary-color);
    font-weight: 600;
}

/* 완료 단계 텍스트 */
.ghostleg-step.completed .ghostleg-step-text {
    color: var(--ghostleg-success);
    font-weight: 600;
}

/* 단계 비활성화 스타일 */
.ghostleg-step-disabled {
    opacity: 0.5 !important;
    pointer-events: none !important;
    transition: var(--ghostleg-transition);
}

/* 단계 안내 알림 */
.step-guide-alert {
    border-left: 4px solid #0d6efd;
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border-color: #0d6efd;
}

/* ===================================
 * 게임 설정 영역
 * =================================== */

/* 설정 컨테이너 */
.ghostleg-settings {
    background: linear-gradient(135deg, var(--ghostleg-light) 0%, #e9ecef 100%);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    border: 1px solid var(--ghostleg-border);
}

/* 설정 카드 */
.ghostleg-settings .card {
    border: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    margin-bottom: 1rem;
}

/* 설정 카드 헤더 */
.ghostleg-settings .card-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, #8b5cf6 100%);
    color: white;
    border-radius: 12px 12px 0 0 !important;
    padding: 1rem 1.25rem;
}

/* 설정 카드 헤더 제목 */
.ghostleg-settings .card-header h5 {
    margin: 0;
    font-weight: 600;
}

/* 참가자 입력 영역 */
.ghostleg-participant-input {
    margin-bottom: 0.75rem;
}

/* 참가자 입력 그룹 */
.ghostleg-participant-input .input-group {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* 참가자 입력 그룹 텍스트 */
.ghostleg-participant-input .input-group-text {
    background: linear-gradient(135deg, var(--ghostleg-light) 0%, #e9ecef 100%);
    border: 1px solid var(--ghostleg-border);
    border-right: none;
}

/* 참가자 입력 필드 */
.ghostleg-participant-input .form-control {
    border-left: none;
    padding: 0.75rem 1rem;
}

/* ===================================
 * 꽝 선택 버튼
 * =================================== */

/* 기본 꽝 토글 버튼 */
.ghostleg-loser-toggle {
    background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 0.5rem 1rem;
    margin: 0.25rem;
    transition: var(--ghostleg-transition);
    font-weight: 500;
}

/* 꽝 토글 버튼 호버 */
.ghostleg-loser-toggle:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* 활성화된 꽝 버튼 */
.ghostleg-loser-toggle.active {
    background: linear-gradient(135deg, var(--ghostleg-danger) 0%, #c82333 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.4);
}

/* ===================================
 * 게임 영역 및 캔버스
 * =================================== */

/* 게임 메인 영역 */
.ghostleg-game-area {
    position: relative;
    min-height: 450px;
    min-width: 100%;
    width: 100%;
    background: #ffffff;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

/* 사다리 컨테이너 */
.ladder-container {
    width: 100%;
    min-height: 400px;
    padding: 0;
}

/* 게임 컨트롤 영역 */
.ghostleg-game-controls {
    text-align: center;
    padding: 1rem;
    background: linear-gradient(135deg, var(--ghostleg-light) 0%, #e9ecef 100%);
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

/* 사다리 캔버스 */
.ladder-canvas {
    width: 100% !important;
    max-width: 100% !important;
    height: auto;
    border-radius: 8px;
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* 캔버스 컨테이너 */
.ghostleg-canvas-container {
    text-align: center;
    background: #fafbfc;
    border-radius: 8px;
    padding: 1rem;
    border: 2px dashed var(--ghostleg-border);
}

/* ===================================
 * 게임 버튼
 * =================================== */

/* 기본 게임 버튼 */
.ghostleg-btn {
    background: linear-gradient(135deg, var(--primary-color) 0%, #8b5cf6 100%);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    border-radius: 8px;
    transition: var(--ghostleg-transition);
    box-shadow: var(--ghostleg-shadow);
    margin: 0.25rem;
}

/* 게임 버튼 호버 */
.ghostleg-btn:hover {
    background: linear-gradient(135deg, #8b5cf6 0%, var(--primary-color) 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(79, 70, 229, 0.4);
    color: white;
}

/* 성공 버튼 (게임 시작) */
.ghostleg-btn.success {
    background: linear-gradient(135deg, var(--ghostleg-success) 0%, #059669 100%);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

/* 성공 버튼 호버 */
.ghostleg-btn.success:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

/* 보조 버튼 (리셋) */
.ghostleg-btn.secondary {
    background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
    box-shadow: 0 4px 12px rgba(108, 117, 125, 0.3);
}

/* 보조 버튼 호버 */
.ghostleg-btn.secondary:hover {
    background: linear-gradient(135deg, #495057 0%, #343a40 100%);
    box-shadow: 0 6px 20px rgba(108, 117, 125, 0.4);
}

/* ===================================
 * 광고 영역
 * =================================== */

/* 초기 광고 영역 */
.ghostleg-initial-ad {
    min-height: 280px;
    width: 100%;
    margin: 0;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--ghostleg-light) 0%, #e9ecef 100%);
    border: 2px dashed var(--ghostleg-border);
    border-radius: 12px;
}

/* 광고 요소 크기 설정 */
.ghostleg-initial-ad .adsbygoogle {
    min-width: 300px !important;
    min-height: 250px !important;
    width: 100% !important;
    max-width: 100% !important;
}

/* ===================================
 * 정보 카드 및 FAQ
 * =================================== */

/* 정보 카드 */
.ghostleg-info-card {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border: 1px solid #bae6fd;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

/* 정보 카드 헤더 */
.ghostleg-info-card .card-header {
    background: linear-gradient(135deg, #0369a1 0%, #0284c7 100%);
    color: white;
    border-radius: 12px 12px 0 0;
    margin: -1.5rem -1.5rem 1rem -1.5rem;
    padding: 1rem 1.5rem;
}

/* 정보 카드 제목 */
.ghostleg-info-card h5, 
.ghostleg-info-card h6 {
    color: #0369a1;
    font-weight: 600;
}

/* FAQ 아코디언 아이템 */
.ghostleg-faq .accordion-item {
    border: 1px solid #e5e8ec;
    border-radius: 8px !important;
    margin-bottom: 0.5rem;
    overflow: hidden;
}

/* FAQ 아코디언 버튼 */
.ghostleg-faq .accordion-button {
    background: linear-gradient(135deg, var(--ghostleg-light) 0%, #f1f3f4 100%);
    border: none;
    color: var(--ghostleg-dark);
    font-weight: 600;
    padding: 1rem 1.25rem;
    border-radius: 8px !important;
}

/* FAQ 아코디언 활성 버튼 */
.ghostleg-faq .accordion-button:not(.collapsed) {
    background: linear-gradient(135deg, #ede9fe 0%, #ddd6fe 100%);
    color: var(--ghostleg-primary);
    border-radius: 8px 8px 0 0 !important;
}

/* FAQ 아코디언 본문 */
.ghostleg-faq .accordion-body {
    background: #ffffff;
    color: #6b7280;
    line-height: 1.6;
    border-radius: 0 0 8px 8px;
}

/* ===================================
 * 반응형 디자인 - 태블릿
 * =================================== */
@media (max-width: 768px) {
    /* 히어로 섹션 */
    .ghostleg-hero {
        padding: 1.5rem 1rem;
    }
    
    .ghostleg-hero .webtools-title {
        font-size: 2rem;
        gap: 0.75rem;
    }
    
    .ghostleg-hero .webtools-icon {
        font-size: 2rem;
    }
    
    .ghostleg-hero .webtools-subtitle {
        font-size: 1rem;
        margin-top: 0.75rem !important;
    }
    
    /* 진행 가이드 */
    .ghostleg-progress-guide {
        padding: 1rem;
    }
    
    .ghostleg-step-circle {
        width: 40px;
        height: 40px;
    }
    
    .ghostleg-step-circle .step-number {
        font-size: 1rem;
    }
    
    .ghostleg-step-text {
        font-size: 0.8rem;
    }
    
    /* 게임 설정 */
    .ghostleg-settings {
        padding: 1rem;
    }
    
    /* 게임 영역 */
    .ghostleg-game-area {
        padding: 1rem;
    }
    
    .ghostleg-game-controls {
        padding: 0.75rem;
    }
    
    /* 버튼 */
    .ghostleg-btn {
        width: 100%;
        margin: 0.25rem 0;
    }
    
    /* 광고 */
    .ghostleg-initial-ad {
        min-height: 300px;
        margin: 0.5rem;
    }
}

/* ===================================
 * 반응형 디자인 - 모바일
 * =================================== */
@media (max-width: 576px) {
    /* 히어로 섹션 */
    .ghostleg-hero {
        padding: 1rem 0.75rem;
    }
    
    .ghostleg-hero .webtools-title {
        font-size: 1.75rem;
        gap: 0.5rem;
    }
    
    .ghostleg-hero .webtools-icon {
        font-size: 1.75rem;
    }
    
    .ghostleg-hero .webtools-subtitle {
        font-size: 0.9rem;
        margin-top: 0.5rem !important;
    }
    
    /* 게임 설정 */
    .ghostleg-settings {
        padding: 0.75rem;
    }
    
    /* 게임 영역 */
    .ghostleg-game-area {
        padding: 0.75rem;
    }
}