
/* ===== 수진선식 모달 전용 CSS ===== */

/* ===== 공통 모달 스타일 ===== */
.welcome-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: welcomeModalFadeIn 0.6s ease-out;
}

.welcome-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(3px);
}

.welcome-modal-content {
    position: relative;
    background: linear-gradient(135deg, #faf8f5 0%, #f5f1eb 50%, #efebe3 100%);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(107, 74, 46, 0.2);
    padding: 2.5rem;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    animation: welcomeContentSlideIn 0.8s ease-out 0.2s both;
    border: 1px solid rgba(107, 74, 46, 0.1);
    box-sizing: border-box;
    margin: 0 auto;
}

/* ===== 헤더 섹션 ===== */
.welcome-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
    position: relative;
    padding: 0;
    margin: 0 0 2rem 0;
    width: 100%;
    min-width: 100%;
    box-sizing: border-box;
}

.welcome-header-left {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
}

.welcome-header-center {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.welcome-header-right {
    flex: 0 0 auto;
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

/* 곡물 일러스트레이션 */
.welcome-grain-illustration {
    flex: 0 0 60px;
    margin-left: 0;
    padding-left: 0;
}

.grain-container {
    position: relative;
    width: 60px;
    height: 60px;
}

.grain {
    position: absolute;
    font-size: 1.5rem;
    animation: grainFloat 3s ease-in-out infinite;
}

.grain-1 { top: 0; left: 0; animation-delay: 0s; }
.grain-2 { top: 20px; right: 0; animation-delay: 1s; }
.grain-3 { bottom: 0; left: 20px; animation-delay: 2s; }

/* 로고 섹션 */
.welcome-logo-section {
    text-align: center;
    margin: 0;
    width: 100%;
    box-sizing: border-box;
}

.welcome-logo {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 0.5rem;
    animation: logoGlow 2s ease-in-out infinite alternate;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.welcome-slogan {
    font-size: 0.85rem;
    color: #8b6f4e;
    font-weight: 500;
    line-height: 1.3;
    width: 100%;
    text-align: center;
    box-sizing: border-box;
}

/* 닫기 버튼 */
.welcome-close-btn {
    position: relative;
    width: 40px;
    height: 40px;
    border: none;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(107, 74, 46, 0.15);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: #6b4a2e;
    transition: all 0.3s ease;
}

.welcome-close-btn:hover {
    background: #6b4a2e;
    color: #fff;
    transform: scale(1.1);
}

/* ===== 메인 콘텐츠 ===== */
.welcome-modal-body {
    margin-bottom: 2rem;
}

.welcome-main-text {
    text-align: center;
}

 .welcome-greeting {
     font-size: 1.8rem;
     font-weight: 700;
     color: #6b4a2e;
     margin-bottom: 1.5rem;
     margin-top: -1rem;
     animation: textFadeIn 0.8s ease-out 0.4s both;
     text-align: center;
 }

.welcome-message {
    font-size: 1.1rem;
    line-height: 1.7;
    color: #8b6f4e;
    margin-bottom: 1.5rem;
    animation: textFadeIn 0.8s ease-out 0.6s both;
}

.welcome-message strong {
    color: #6b4a2e;
    font-weight: 600;
}

.welcome-personal-message {
    font-size: 0.95rem;
    color: #6b4a2e;
    line-height: 1.6;
    margin-bottom: 0;
    animation: textFadeIn 0.8s ease-out 0.8s both;
    font-weight: 500;
    background: rgba(107, 74, 46, 0.05);
    padding: 1rem;
    border-radius: 8px;
    border-left: 3px solid #6b4a2e;
}

/* ===== CTA 버튼 ===== */
.welcome-modal-actions {
    text-align: center;
    margin-bottom: 1.5rem;
    animation: textFadeIn 0.8s ease-out 1s both;
}

.welcome-buttons {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    justify-content: center;
}

.welcome-btn {
    flex: 1;
    max-width: 200px;
    padding: 1rem 1.5rem;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    cursor: pointer;
}

.welcome-btn-primary {
    background: linear-gradient(135deg, #8b6f4e 0%, #6b4a2e 100%);
    color: #fff;
    box-shadow: 0 4px 15px rgba(107, 74, 46, 0.3);
}

.welcome-btn-primary:hover {
    background: linear-gradient(135deg, #6b4a2e 0%, #8b6f4e 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(107, 74, 46, 0.4);
}

.welcome-btn-secondary {
    background: linear-gradient(135deg, #f0e8e0 0%, #e8d8c8 100%);
    color: #6b4a2e;
    border: 2px solid #8b6f4e;
    box-shadow: 0 4px 15px rgba(107, 74, 46, 0.1);
}

.welcome-btn-secondary:hover {
    background: linear-gradient(135deg, #e8d8c8 0%, #f0e8e0 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(107, 74, 46, 0.2);
}

/* 4개 버튼 개별 색상 - 내용별 맞춤 (순서 변경됨) */
.welcome-btn:nth-child(1) {
    background: linear-gradient(135deg, #27ae60 0%, #229954 100%);
    color: #fff;
    border: none;
    box-shadow: 0 4px 15px rgba(39, 174, 96, 0.3);
}

.welcome-btn:nth-child(1):hover {
    background: linear-gradient(135deg, #229954 0%, #27ae60 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(39, 174, 96, 0.4);
}

.welcome-btn:nth-child(2) {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: #fff;
    border: none;
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.3);
}

.welcome-btn:nth-child(2):hover {
    background: linear-gradient(135deg, #c0392b 0%, #e74c3c 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(231, 76, 60, 0.4);
}

.welcome-btn:nth-child(3) {
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
    color: #fff;
    border: none;
    box-shadow: 0 4px 15px rgba(243, 156, 18, 0.3);
}

.welcome-btn:nth-child(3):hover {
    background: linear-gradient(135deg, #e67e22 0%, #f39c12 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(243, 156, 18, 0.4);
}

.welcome-btn:nth-child(4) {
    background: linear-gradient(135deg, #9b59b6 0%, #8e44ad 100%);
    color: #fff;
    border: none;
    box-shadow: 0 4px 15px rgba(155, 89, 182, 0.3);
}

.welcome-btn:nth-child(4):hover {
    background: linear-gradient(135deg, #8e44ad 0%, #9b59b6 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(155, 89, 182, 0.4);
}

.welcome-note {
    font-size: 0.8rem;
    color: #8b6f4e;
    font-style: italic;
    margin: 0;
}

/* ===== 하단 체크박스 ===== */
.welcome-modal-footer {
    text-align: center;
    animation: textFadeIn 0.8s ease-out 1.2s both;
}

.welcome-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.9rem;
    color: #8b6f4e;
}

.welcome-checkbox input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 18px;
    height: 18px;
    border: 2px solid #8b6f4e;
    border-radius: 4px;
    position: relative;
    transition: all 0.3s ease;
}

.welcome-checkbox input[type="checkbox"]:checked + .checkmark {
    background: #6b4a2e;
    border-color: #6b4a2e;
}

.welcome-checkbox input[type="checkbox"]:checked + .checkmark::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-size: 12px;
    font-weight: bold;
}

.checkbox-text {
    font-weight: 500;
}

/* ===== 애니메이션 ===== */
@keyframes welcomeModalFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes welcomeContentSlideIn {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes grainFloat {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    50% {
        transform: translateY(-10px) rotate(5deg);
    }
}

@keyframes logoGlow {
    0% {
        box-shadow: 0 0 5px rgba(107, 74, 46, 0.3);
    }
    100% {
        box-shadow: 0 0 20px rgba(107, 74, 46, 0.6);
    }
}

@keyframes textFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== PC 버전 전용 스타일 ===== */
@media (min-width: 769px) {
    .btn-text-pc {
        display: inline;
    }
    
    .btn-text-mobile {
        display: none;
    }
    .welcome-modal-content {
        max-width: 600px;
        padding: 3rem;
    }

    .welcome-logo-section {
        position: relative;
    }
    
    .grain-container {
        position: absolute;
        top: -30px;
        left: 50%;
        transform: translateX(-50%);
        width: 120px;
        height: 120px;
        z-index: 2;
    }
    
    .grain {
        font-size: 1.2rem;
        animation: grainFloatAroundLogo 4s ease-in-out infinite;
    }
    
    .grain-1 { 
        top: 10px; 
        left: 20px; 
        animation-delay: 0s; 
    }
    .grain-2 { 
        top: 60px; 
        right: 10px; 
        animation-delay: 1.3s; 
    }
    .grain-3 { 
        bottom: 20px; 
        left: 50px; 
        animation-delay: 2.6s; 
    }

    .welcome-logo {
        width: 100px;
        height: 100px;
    }

    .welcome-slogan {
        font-size: 1rem;
    }

    .welcome-greeting {
        font-size: 2.2rem;
        margin-top: -1.2rem;
    }

    .welcome-message {
        font-size: 19.1px;
    }

    .welcome-personal-message {
        font-size: 1rem;
    }

    .welcome-buttons {
        flex-direction: row;
        gap: 1rem;
        flex-wrap: nowrap;
        justify-content: center;
    }

    .welcome-btn {
        max-width: 180px;
        padding: 1rem 1rem;
        font-size: 0.9rem;
        flex: 1;
        min-width: 0;
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
        line-height: 1.2;
    }

    .welcome-btn i {
        font-size: 1.2rem;
        margin-right: 0;
        margin-bottom: 0.3rem;
    }
}

@keyframes grainFloatAroundLogo {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    25% {
        transform: translateY(-15px) rotate(3deg);
    }
    50% {
        transform: translateY(-5px) rotate(-2deg);
    }
    75% {
        transform: translateY(-20px) rotate(1deg);
    }
}

@keyframes grainFloatAroundLogoMobile {
    0%, 100% {
        transform: translateY(0px) translateX(0px) rotate(0deg);
        opacity: 0.8;
    }
    25% {
        transform: translateY(-12px) translateX(3px) rotate(8deg);
        opacity: 1;
    }
    50% {
        transform: translateY(-20px) translateX(-2px) rotate(-3deg);
        opacity: 0.9;
    }
    75% {
        transform: translateY(-8px) translateX(5px) rotate(5deg);
        opacity: 1;
    }
}

/* ===== 모바일 버전 전용 스타일 ===== */
@media (max-width: 768px) {
    .btn-text-pc {
        display: none;
    }
    
    .btn-text-mobile {
        display: inline;
    }
    .welcome-modal-content {
        width: 95%;
        max-width: 400px;
        padding: 2.5rem 28px;
        margin: 1rem;
        min-height: 70vh;
    }

    .welcome-modal-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
        position: relative;
    }

    .welcome-header-left,
    .welcome-header-center,
    .welcome-header-right {
        flex: none;
        width: 100%;
    }

    .welcome-grain-illustration {
        order: 1;
        position: absolute;
        top: -20px;
        left: 50%;
        transform: translateX(-50%);
        z-index: 10;
    }

    .welcome-logo-section {
        order: 2;
        position: relative;
    }

    .welcome-close-btn {
        order: 3;
        position: absolute;
        top: -10px;
        right: -10px;
        z-index: 15;
    }

    /* 모바일에서 곡물들이 로고 바로 앞에서 떠다니도록 */
    .grain-container {
        position: absolute;
        top: -10px;
        left: 50%;
        transform: translateX(-50%);
        width: 60px;
        height: 60px;
        z-index: 5;
    }
    
    .grain {
        font-size: 0.8rem;
        animation: grainFloatAroundLogoMobile 3s ease-in-out infinite;
    }
    
    .grain-1 { 
        top: 2px; 
        left: 5px; 
        animation-delay: 0s; 
    }
    .grain-2 { 
        top: 25px; 
        right: 5px; 
        animation-delay: 1s; 
    }
    .grain-3 { 
        bottom: 2px; 
        left: 20px; 
        animation-delay: 2s; 
    }

    .welcome-logo {
        width: 70px;
        height: 70px;
    }

    .welcome-slogan {
        font-size: 0.8rem;
        margin-top: 20px;
    }

    .welcome-greeting {
        font-size: 1.6rem;
        margin-bottom: 1rem;
        margin-top: -2.5rem;
    }

    .welcome-message {
        font-size: 12.3px;
        margin-bottom: 1rem;
    }

    .welcome-personal-message {
        font-size: 0.9rem;
        padding: 0.8rem;
        line-height: 1.6;
    }
    
    .welcome-personal-message br {
        display: block;
        content: "";
        margin: 0.3rem 0;
    }

    .welcome-buttons {
        flex-direction: row;
        gap: 1;
        justify-content: center;
        align-items: center;
        flex-wrap: wrap;
        margin-bottom: 30px;
        width: 100%;
    }

    .welcome-btn {
        max-width: 140px;
        padding: 0.8rem 1rem;
        font-size: 0.85rem;
        min-width: 0;
        gap: 0.3rem;
        display: flex;
        align-items: center;
        justify-content: center;
        text-align: center;
        border-radius: 20px;
        font-weight: 600;
        box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
    }
    
    .mobile-hidden {
        display: none !important;
    }

    .welcome-btn i {
        font-size: 0.9rem;
        margin-right: 0.3rem;
    }
    
    /* 모바일 뱃지 스타일 - 부드러운 톤 */
    .welcome-btn:nth-child(1) {
        background: linear-gradient(135deg, #8b6f4e 0%, #6b4a2e 100%);
        color: #fff;
        border: none;
        box-shadow: 0 4px 15px rgba(107, 74, 46, 0.2);
        margin-right: 0;
    }

    .welcome-btn:nth-child(1):hover {
        background: linear-gradient(135deg, #6b4a2e 0%, #8b6f4e 100%);
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(107, 74, 46, 0.3);
    }

    .welcome-btn:nth-child(2) {
        background: linear-gradient(135deg, #a67c52 0%, #8b6f4e 100%);
        color: #fff;
        border: none;
        box-shadow: 0 4px 15px rgba(139, 111, 78, 0.2);
        margin-left: 0;
    }

    .welcome-btn:nth-child(2):hover {
        background: linear-gradient(135deg, #8b6f4e 0%, #a67c52 100%);
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(139, 111, 78, 0.3);
    }

    .welcome-note {
        font-size: 0.75rem;
    }

    .welcome-checkbox {
        font-size: 0.8rem;
    }
}

/* ===== 스크롤 잠금 ===== */
body.modal-open {
    overflow: hidden !important;
    position: fixed;
    width: 100%;
    height: 100%;
}

html.modal-open {
    overflow: hidden !important;
}

/* ===== 접근성 ===== */
@media (prefers-reduced-motion: reduce) {
    .welcome-modal,
    .welcome-modal-content,
    .welcome-greeting,
    .welcome-message,
    .welcome-personal-message,
    .welcome-modal-actions,
    .welcome-modal-footer,
    .grain,
    .welcome-logo {
        animation: none;
    }
}

/* ===== 다크모드 대응 ===== */
@media (prefers-color-scheme: dark) {
    .welcome-modal-content {
        background: linear-gradient(135deg, #2a2a2a 0%, #1a1a1a 100%);
        border: 1px solid rgba(255, 255, 255, 0.1);
    }

    .welcome-greeting,
    .welcome-message strong {
        color: #f0e8e0;
    }

    .welcome-message,
    .welcome-slogan {
        color: #d0c8c0;
    }

    .welcome-close-btn {
        background: #333;
        color: #f0e8e0;
    }

    .welcome-close-btn:hover {
        background: #f0e8e0;
        color: #333;
    }
} 