/* Challenge Detail Page Styles */
* {
    font-family: 'Noto Sans KR', sans-serif;
}

body {
    background-color: #f8fffe;
    margin: 0;
    padding: 0;
}

.detail-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.back-button {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #6b7280;
    text-decoration: none;
    font-size: 14px;
    margin-bottom: 20px;
    padding: 8px 0;
}

.back-button:hover {
    color: #374151;
    text-decoration: none;
}

.challenge-layout {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 40px;
    margin-bottom: 30px;
}

.challenge-image-section {
    position: relative;
}

.challenge-hero-image {
    width: 100%;
    height: 400px;
    border-radius: 16px;
    object-fit: cover;
    position: relative;
}

.category-badge {
    position: absolute;
    top: 20px;
    left: 20px;
    background: rgba(255, 255, 255, 0.95);
    color: #374151;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    backdrop-filter: blur(10px);
}

.challenge-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* 웹: 4개 가로로 */
    gap: 20px;
    margin-top: 10px;
}

.stat-box {
    text-align: center;
    background: white;
    padding: 24px;
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.stat-icon {
    width: 40px;
    height: 40px;
    margin: 0 auto 12px auto;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #10b981;
}

.stat-number {
    font-size: 32px;
    font-weight: 800;
    color: #111827;
    line-height: 1;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 14px;
    color: #6b7280;
    font-weight: 500;
}

.challenge-info-section {
    background: white;
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    height: fit-content;
}

.challenge-title {
    font-size: 32px;
    font-weight: 800;
    color: #111827;
    margin-bottom: 16px;
    line-height: 1.2;
}

.challenge-description {
    color: #6b7280;
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 24px;
}

.progress-section {
    margin-bottom: 32px;
}

.progress-label {
    display: flex;
    justify-content: between;
    align-items: center;
    margin-bottom: 8px;
}

.progress-text {
    font-size: 14px;
    color: #6b7280;
}

.progress-percent {
    font-size: 18px;
    font-weight: 700;
    color: #111827;
}

.progress-bar-container {
    width: 100%;
    height: 8px;
    background: #f3f4f6;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 24px;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #10b981, #06d6a0);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.join-button {
    width: 100%;
    background: #10b981;
    color: white;
    border: none;
    padding: 16px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.join-button:hover {
    background: #059669;
    color: white;
    transform: translateY(-2px);
}

.join-button:disabled {
    background: #9ca3af;
    cursor: not-allowed;
    transform: none;
}

.challenge-details-section {
    background: white;
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    margin-top: 40px;
}

.section-title {
    font-size: 20px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.challenge-rules {
    margin-bottom: 32px;
}

.rule-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 16px;
}

.rule-icon {
    width: 24px;
    height: 24px;
    background: #10b981;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 12px;
    font-weight: 700;
    flex-shrink: 0;
    margin-top: 2px;
}

.rule-text {
    color: #374151;
    font-size: 16px;
    line-height: 1.5;
}

.participation-steps {
    margin-bottom: 32px;
}

.step-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 16px;
}

.step-number {
    width: 24px;
    height: 24px;
    background: #10b981;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 14px;
    font-weight: 700;
    flex-shrink: 0;
}

.step-text {
    color: #374151;
    font-size: 16px;
    line-height: 1.5;
}

.verification-notice {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 12px;
    padding: 16px;
    margin-top: 24px;
}

.verification-notice-title {
    font-size: 14px;
    font-weight: 600;
    color: #166534;
    margin-bottom: 8px;
}

.verification-notice-text {
    font-size: 14px;
    color: #166534;
    line-height: 1.5;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .detail-container {
        max-width: 100%;
        padding: 16px;
    }
    
    .challenge-layout {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .challenge-info-section {
        order: 2;
    }
    
    .challenge-hero-image {
        height: 350px;
    }

    .challenge-image-section {
        order: 1;
    }
}

@media (max-width: 768px) {
    .detail-container {
        padding: 12px;
    }

    .back-button {
        font-size: 14px;
        margin-bottom: 16px;
    }

    .challenge-hero-image {
        height: 250px;
        border-radius: 12px;
    }

    .category-badge {
        top: 12px;
        left: 12px;
        font-size: 12px;
        padding: 6px 12px;
    }

    .challenge-title {
        font-size: 24px;
        margin-bottom: 12px;
    }

    .challenge-description {
        font-size: 14px;
        margin-bottom: 20px;
    }

    .challenge-info-section,
    .challenge-details-section {
        padding: 20px;
        border-radius: 12px;
    }

    .challenge-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        margin-top: 10px;
    }

    .stat-box {
        padding: 16px;
        border-radius: 12px;
    }

    .stat-number {
        font-size: 24px;
    }

    .stat-label {
        font-size: 12px;
    }

    .stat-icon {
        width: 32px;
        height: 32px;
        font-size: 16px;
        margin-bottom: 8px;
    }

    .section-title {
        font-size: 18px;
        margin-bottom: 16px;
    }

    .join-button {
        position: fixed; /* 모바일에서 하단 고정 */
        bottom: 0;
        left: 0;
        right: 0;
        border-radius: 0; /* 하단 고정 시 radius 제거 */
        z-index: 1000;
        box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    }

    .progress-section {
        margin-bottom: 24px;
    }

    .progress-percent {
        font-size: 16px;
    }

    .policy-box {
        padding: 16px;
        margin-bottom: 16px;
    }

    .policy-box h5 {
        font-size: 16px;
        margin-bottom: 12px;
    }

    .policy-box li {
        font-size: 14px;
        margin-bottom: 8px;
    }

    .fixed-bottom-btn {
        display: block;
    }
}

@media (max-width: 480px) {
    .detail-container {
        padding: 8px;
    }

    .challenge-hero-image {
        height: 200px;
        border-radius: 10px;
    }

    .challenge-title {
        font-size: 20px;
        line-height: 1.3;
    }

    .challenge-description {
        font-size: 14px;
        line-height: 1.5;
    }

    .challenge-info-section,
    .challenge-details-section {
        padding: 16px;
    }

    .challenge-stats {
        gap: 10px;
        margin-top: 10px;
    }

    .stat-box {
        padding: 12px;
    }

    .stat-number {
        font-size: 20px;
    }

    .stat-label {
        font-size: 11px;
    }

    .section-title {
        font-size: 16px;
        margin-bottom: 12px;
    }

    .back-button {
        font-size: 13px;
    }

    .category-badge {
        font-size: 11px;
        padding: 4px 8px;
    }

    .fixed-bottom-btn {
        padding: 12px;
    }

    .fixed-bottom-btn .btn {
        height: 50px;
        font-size: 16px;
    }
}

/* 가로 모드 대응 */
@media (max-width: 768px) and (orientation: landscape) {
    .challenge-hero-image {
        height: 180px;
    }
    
    .challenge-stats {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .stat-box {
        padding: 12px 8px;
    }
    
    .stat-number {
        font-size: 18px;
    }
}

/* 데스크탑에서는 하단 고정 버튼 숨기기 */
@media (min-width: 769px) {
    .fixed-bottom-btn {
        display: none;
    }
}

/* 기존 스타일 유지 */
.policy-box {
    border: 1px solid #e9ecef;
    background-color: #fdfdfd;
    transition: all 0.2s ease;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.policy-box:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.06);
}

.fixed-bottom-btn {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 1rem;
    background-color: #fff;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
    z-index: 999;
}

.fixed-bottom-btn .btn {
    width: 100%;
    height: 55px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 0.6rem;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    line-height: 1;
}
