/* 기본 스타일 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans KR', sans-serif;
    background: #ffffff;
    min-height: 100vh;
    color: #000000;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    position: relative; /* 내부 절대배치 요소 기준점 */
}

/* 기본: 결과/분석/고지/상태 섹션은 숨김 (버튼 클릭 시 표시) */
.prediction-section,
.analysis-section,
.disclaimer-section,
.status-card {
    display: none;
}

/* 헤더 */
/* 구글 스타일 히어로 영역: 화면 중앙보다 살짝 위 */
.hero {
    margin-top: 180px;
    margin-bottom : 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 28px;
    padding-top: 0;
    top: 0;
    z-index: 50;
    background: #ffffff;
}

.hero-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}


.site-logo {
    height: auto;
    /* 약 50% 상향 */
    width: clamp(180px, 45vw, 250px);
    max-width: 80vw;
}

/* 반응형: 화면이 줄어들수록 로고를 단계적으로 축소 */
@media (max-width: 1024px) {
    .site-logo { width: clamp(165px, 42vw, 250px); }
}
@media (max-width: 768px) {
    .site-logo { width: clamp(150px, 54vw, 200px); }
}
@media (max-width: 480px) {
    .site-logo { width: clamp(135px, 72vw, 200px); }
}

.header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #111111;
    margin-bottom: 10px;
}

.header p {
    font-size: 1.1rem;
    color: #444444;
}

/* 메인 콘텐츠 */
.main-content {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* 카드 스타일 */
.status-card, .prediction-section, .analysis-section, .disclaimer-section {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

/* 서비스 상태 */
.status-indicator {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.1rem;
}

.status-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #e53e3e;
    animation: pulse 2s infinite;
}

.status-dot.online {
    background: #38a169;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

/* 버튼 스타일 */
.btn {
    padding: 15px 30px;
    border: none;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.btn-primary {
    background: #0080ff;
    color: #ffffff;
    box-shadow: 0 5px 15px rgba(0, 128, 255, 0.35);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 128, 255, 0.5);
    background: #0074e0;
}

.btn:focus-visible,
.modal-close-x:focus-visible,
.feedback-fab:focus-visible {
    outline: 3px solid rgba(0, 128, 255, 0.65);
    outline-offset: 2px;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* 모달 */
.modal.hidden { display: none; }
.modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}
/* 의견 모달은 메인 화면과 동일한 z-index로 표시 */
#feedback-modal { z-index: 50; }
.modal-content {
    position: relative; /* X 버튼 기준 위치 */
    width: auto;
    max-width: 720px;
    background: #ffffff;
    border-radius: 16px;
    padding: 20px 20px 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.25);
}
.modal-close-x {
    position: absolute;
    top: 10px;
    right: 14px;
    background: transparent;
    border: none;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    color: #333;
    z-index: 10; /* 플레이어 위에 표시 */
}
.modal-close-x:hover { color: #000; }
.modal-content h3 {
    margin-bottom: 8px;
}
.modal-desc { color: #555; margin-bottom: 12px; }
#stretch-video-wrap { position: relative; background: #000; border-radius: 10px; overflow: hidden; display: flex; justify-content: center; }
.modal-content #stretch-video-wrap { z-index: 1; }
.yt-player { width: 640px; height: 390px; background: #000; display: block; }
@media (max-width: 720px) {
  .yt-player { width: 92vw; height: calc(92vw * 9 / 16); }
}
.modal-timer { margin: 10px 0 0; font-weight: 600; color: #333; }
.modal-actions { display: flex; gap: 10px; justify-content: center; margin-top: 14px; }

/* 예측 컨트롤 */
.prediction-controls {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 30px;
}

.prediction-options {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.prediction-options label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 10px 15px;
    border-radius: 25px;
    background: #f7fafc;
    transition: all 0.3s ease;
}

.prediction-options label:hover {
    background: #edf2f7;
}

.prediction-options input[type="radio"] {
    margin: 0;
}

/* 추천 결과 */
.prediction-results {
    margin-top: 30px;
}
.prediction-section {
    max-width: 560px; /* 1세트 기준 컴팩트 */
    margin: 0 auto;
}
.prediction-results h3 {
    text-align: center;
    font-size: 1.6rem; /* 세트 제목(1.2rem)보다 크게 */
}
.good-luck {
    margin-top: 12px;
    text-align: center;
    font-weight: 700;
    color: #000000;
}

.number-sets {
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: center;
}

/* 반응형: 태블릿 이상에서는 가로 정렬 */
@media (min-width: 600px) {
    .number-sets {
        flex-direction: row;
        justify-content: center;
        flex-wrap: wrap;
    }
}

.number-set {
    background: #ffffff;
    color: #000000;
    padding: 20px;
    border-radius: 15px;
    text-align: center;
}

.number-set h4 { display: none; margin: 0; }

.numbers {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #0080ff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1.1rem;
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* 신뢰도 텍스트 제거에 따라 스타일 제거 */

.reasoning {
    background: #f7fafc;
    padding: 20px;
    border-radius: 15px;
    margin-top: 20px;
}

.reasoning h4 {
    margin-bottom: 15px;
    color: #111111;
}

.reasoning ul {
    list-style: none;
    padding: 0;
}

.reasoning li {
    padding: 8px 0;
    border-bottom: 1px solid #e2e8f0;
    color: #333333;
}

.reasoning li:last-child {
    border-bottom: none;
}

/* 분석 결과 */
.analysis-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.analysis-card {
    background: #ffffff;
    padding: 20px;
    border-radius: 15px;
    border-left: 4px solid #0080ff;
    border: 1px solid #f0f4f8;
}

.analysis-card h4 {
    margin-bottom: 15px;
    color: #111111;
    display: flex;
    align-items: center;
    gap: 8px;
}

.number-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.number-item {
    background: #0080ff;
    color: #ffffff;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 0.9rem;
    font-weight: 500;
}

.ratio-display {
    display: flex;
    gap: 20px;
}

.ratio-item {
    text-align: center;
}

.ratio-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #0080ff;
}

.ratio-label {
    font-size: 0.9rem;
    color: #718096;
}

.seasonal-display {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.season-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #e2e8f0;
}

.season-item:last-child {
    border-bottom: none;
}

/* 고지사항 */
.disclaimer-content {
    background: #fff5f5;
    border: 1px solid #fed7d7;
    border-radius: 10px;
    padding: 20px;
}

.disclaimer-content p {
    margin-bottom: 10px;
    color: #c53030;
    font-size: 0.95rem;
}

.disclaimer-content p:last-child {
    margin-bottom: 0;
}

/* 로딩 오버레이 */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.loading-spinner {
    background: white;
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.loading-spinner i {
    font-size: 3rem;
    color: #0080ff;
    margin-bottom: 20px;
}

.loading-spinner p {
    font-size: 1.1rem;
    color: #4a5568;
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .container {
        padding: 20px;
    }
    
    .header h1 {
        font-size: 2rem;
    }
    
    .prediction-options {
        flex-direction: column;
    }
    
    .analysis-grid {
        grid-template-columns: 1fr;
    }
    
    .number-sets {
        grid-template-columns: 1fr;
    }

   /* Ensure laurel-wrap stays in a single row on tablet and below */
   .laurel-wrap {
    flex-direction: column;
    flex-wrap: nowrap;
    left: 36px; /* shift slightly for smaller screens */
    align-items: center;
    }
    
    .laurel {
        /* tablet 이하에서 44px의 2.5배로 설정 (44 * 2.5 = 110px) */
        width: 110px;
        height: 110px;
    }
}

/* 애니메이션 */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.prediction-results {
    animation: fadeIn 0.5s ease-out;
}

/* 모션 최소화 환경 지원 */
@media (prefers-reduced-motion: reduce) {
    * { animation: none !important; transition: none !important; }
    .status-dot { animation: none !important; }
    .prediction-results { animation: none !important; }
}

/* 히어로 영역 여백 반응형 보정 */
@media (max-width: 768px) {
    .hero { margin-top: 120px; }
}
@media (max-width: 480px) {
    .hero { margin-top: 80px; }
}
/* 광고 패널 */
.ad-section {
    margin-top: 120px;
    display: flex;
    justify-content: center;
}

.ad-panel {
    width: 100%;
    height: clamp(320px, 60vh, 640px);
    background: #000000;
 
    overflow: hidden;
 
}

.ad-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

@media (max-width: 768px) {
    .ad-panel { height: clamp(260px, 50vh, 520px); }
}
@media (max-width: 480px) {
    .ad-panel { height: clamp(220px, 45vh, 420px); }
}

/* 의견 남기기 FAB 버튼 */
.feedback-fab {
    position: absolute; /* 컨테이너 패딩/마진에 맞춰 정렬 */
    top: 20px;
    right: 20px; /* 컨테이너 padding과 일치 */
    z-index: 60; /* 메인(50)보다 위, 모달(2000)보다 아래 */
    padding: 10px 16px;
    border-radius: 20px;
    background: #0080ff;
    color: #ffffff;
    border: none;
    cursor: pointer;
    font-weight: 600;
}
.feedback-fab:hover { background: #000000; }

@media (max-width: 480px) {
    .feedback-fab {
        top: 20px;
        right: 20px;
        padding: 8px 12px;
        border-radius: 18px;
    }
}

/* 의견 모달 입력 */
.feedback-body { margin-top: 10px; }
.feedback-input {
    width: 100%;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    padding: 10px 12px;
    resize: vertical;
    font-family: inherit;
}

/* 의견 모달을 스트레칭 모달과 동일 폭(640px)로 정렬 */
#feedback-modal .modal-desc,
#feedback-modal h3,
#feedback-modal .feedback-body,
#feedback-modal .modal-actions {
    width: 640px;
    max-width: 92vw;
    margin-left: auto;
    margin-right: auto;
}

/* 닉네임 입력 스타일 */
.nickname-input-wrap {
    margin: 20px 0;
}

.nickname-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-family: inherit;
    font-size: 16px;
    transition: border-color 0.3s ease;
    background: #ffffff;
}

.nickname-input:focus {
    outline: none;
    border-color: #4285f4;
    box-shadow: 0 0 0 3px rgba(66, 133, 244, 0.1);
}

.nickname-input::placeholder {
    color: #999;
}

/* 닉네임 모달을 스트레칭 모달과 동일 폭(640px)로 정렬 */
#nickname-modal .modal-desc,
#nickname-modal h3,
#nickname-modal .nickname-input-wrap,
#nickname-modal .modal-actions {
    width: 640px;
    max-width: 92vw;
    margin-left: auto;
    margin-right: auto;
}

/* 월계관 아이콘 (의견 버튼과 같은 X축, 왼쪽 끝으로 배치) */
/* 래퍼로 묶어 같이 관리: 좌우 간격 0 */
.laurel-wrap {
    position: absolute;
    top: 20px;
    left: 20px;
    display: flex;
    gap: 0; /* 이미지들 사이 간격 0px */
    align-items: flex-start;
    z-index: 60;
}
.laurel {
    /* flex 아이템으로 동작하게 하여 래퍼에서 일괄 제어 */
    position: relative;
    width: 132px; /* 기본 데스크탑 사이즈 */
    height: 132px; /* 기본 데스크탑 사이즈 */
    margin: 0;
}
.laurel-1 { order: 0; }
.laurel-2 { order: 1; }

/* 모바일 퍼스트: 기본은 모바일(<=480px) */
@media (max-width: 480px) {
    .laurel { width: 90px; height: 90px; }
    .laurel-wrap { left: 20px; }
}

/* 481px ~ 768px: 태블릿(중간) 크기 - 44px * 2.5 = 110px */
@media (min-width: 481px) and (max-width: 768px) {
    .laurel { width: 110px; height: 110px; }
    .laurel-wrap { left: 20px; }
}

/* >= 769px: 데스크탑 큰 사이즈 - 44px * 3 = 132px */
@media (min-width: 769px) {
    .laurel { width: 132px; height: 132px; }
    .laurel-wrap { left: 60px; }
}

/* 고정폭 제거: 컨테이너 폭에 맞춰 1:1 비율로 확장 */

/* 스크롤바 스타일 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #0080ff;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #006fe6;
}