/* 기본 설정 */
* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
}

body { 
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; 
    line-height: 1.5; 
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); 
    color: #333; 
    min-height: 100vh;
}

.container { 
    max-width: 420px; 
    margin: 0 auto; 
    background: #fff; 
    min-height: 100vh; 
    position: relative; 
}

/* 토스트 알림 */
.toast-container {
    position: fixed; 
    top: 20px; 
    left: 50%; 
    transform: translateX(-50%);
    z-index: 1000; 
    display: flex; 
    flex-direction: column; 
    gap: 10px;
    width: calc(100% - 40px); 
    max-width: 380px;
}

.toast {
    background: rgba(0, 0, 0, 0.85); 
    color: white; 
    padding: 12px 16px;
    border-radius: 8px; 
    display: flex; 
    align-items: center; 
    gap: 10px;
    animation: slideDown 0.3s ease-out, fadeOut 0.3s ease-out 3.7s forwards;
    backdrop-filter: blur(10px); 
    font-size: 13px;
}

@keyframes slideDown {
    from { transform: translateY(-100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@keyframes fadeOut {
    to { opacity: 0; transform: translateY(-20px); }
}

.toast-icon {
    font-size: 18px;
}

.toast-text {
    flex: 1; 
    line-height: 1.4;
}

.toast-highlight {
    color: #ffc107; 
    font-weight: 600;
}

/* 상단 - 선착순 마감 */
.top-section { 
    background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
    color: white; 
    padding: 25px 20px; 
    text-align: center; 
    position: relative;
    box-shadow: 0 4px 20px rgba(255,107,53,0.3);
}

.summer-badge {
    background: rgba(255,255,255,0.2); 
    padding: 6px 15px; 
    border-radius: 20px;
    font-size: 12px; 
    font-weight: 600; 
    margin-bottom: 15px; 
    display: inline-block;
}

.deadline-warning {
    background: rgba(255,255,255,0.95); 
    color: #ff3333; 
    padding: 10px;
    border-radius: 8px; 
    margin-bottom: 15px; 
    font-size: 13px; 
    font-weight: 600;
    animation: warningPulse 2s ease-in-out infinite;
}

@keyframes warningPulse {
    0%, 100% { opacity: 0.9; }
    50% { opacity: 1; transform: scale(1.02); }
}

.main-title {
    font-size: 20px; 
    font-weight: 800; 
    margin-bottom: 10px; 
    line-height: 1.3;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.sub-title {
    font-size: 14px; 
    opacity: 0.9; 
    margin-bottom: 20px;
}

.spots-container {
    background: rgba(255,255,255,0.15); 
    border-radius: 15px; 
    padding: 20px;
    border: 2px solid rgba(255,255,255,0.3);
}

.spots-title {
    font-size: 16px; 
    font-weight: 700; 
    margin-bottom: 15px;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.spots-display {
    background: white; 
    color: #ff6b35; 
    padding: 15px; 
    border-radius: 12px;
    font-size: 28px; 
    font-weight: 900; 
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.spots-number {
    display: inline-block; 
    min-width: 40px; 
    text-align: center;
    transition: all 0.3s ease;
}

.spots-number.changing {
    animation: numberChange 0.5s ease-in-out;
}

@keyframes numberChange {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); color: #ff3b00; }
}

.time-info {
    font-size: 11px; 
    margin-top: 10px; 
    opacity: 0.8;
}

/* 가격 비교 섹션 */
.price-section {
    background: #f8f9fa; 
    padding: 30px 20px; 
    text-align: center;
}

.price-title {
    font-size: 18px; 
    font-weight: 700; 
    color: #2c3e50; 
    margin-bottom: 10px;
}

.price-subtitle {
    font-size: 14px; 
    color: #666; 
    margin-bottom: 20px;
}

.price-chart-container {
    background: white; 
    border-radius: 15px; 
    padding: 20px; 
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    margin-bottom: 20px; 
    height: 300px;
}

.price-highlight {
    background: #fff3cd; 
    border: 2px solid #ffc107; 
    border-radius: 10px;
    padding: 15px; 
    margin-top: 15px;
}

.price-highlight-text {
    font-size: 14px; 
    color: #856404; 
    font-weight: 600;
}

/* 중간 - 리뷰 슬라이더 */
.middle-section {
    padding: 30px 20px; 
    background: white;
}

.review-title {
    text-align: center; 
    font-size: 18px; 
    font-weight: 700; 
    margin-bottom: 10px; 
    color: #2c3e50;
}

.review-subtitle {
    text-align: center; 
    font-size: 14px; 
    color: #666; 
    margin-bottom: 25px;
    padding: 10px; 
    background: #f8f9fa; 
    border-radius: 8px;
    font-weight: 500;
}

/* 스마트스토어 상품 카드 */
.store-products {
    display: block;
    margin: 20px 0; 
    padding: 20px; 
    background: #f8f9fa;
    border-radius: 15px;
}

.store-image {
    width: 100%; 
    max-width: 380px; 
    margin: 0 auto; 
    display: block;
    border-radius: 10px; 
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.review-slider {
    position: relative; 
    overflow: hidden; 
    border-radius: 15px;
    background: white; 
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    touch-action: pan-y pinch-zoom;
}

.review-wrapper {
    display: flex; 
    transition: transform 0.3s ease-out;
    will-change: transform;
}

.review-item {
    width: 100%; 
    flex-shrink: 0; 
    padding: 20px;
    background: white;
}

.review-header {
    display: flex; 
    align-items: flex-start; 
    margin-bottom: 12px; 
    gap: 10px;
    flex-wrap: wrap;
}

.review-avatar {
    width: 35px; 
    height: 35px; 
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 50%; 
    display: flex; 
    align-items: center; 
    justify-content: center;
    color: white; 
    font-weight: bold; 
    font-size: 14px; 
    flex-shrink: 0;
}

.review-info {
    flex: 1; 
    min-width: 0;
}

.review-name {
    font-weight: 600; 
    color: #2c3e50; 
    font-size: 13px; 
    word-break: break-word;
}

.review-grade {
    color: #666; 
    font-size: 11px; 
    margin-top: 2px; 
    line-height: 1.4;
}

.review-stars {
    color: #ffc107; 
    font-size: 14px; 
    white-space: nowrap;
}

.review-badges {
    display: flex; 
    flex-wrap: wrap; 
    gap: 4px; 
    margin-top: 4px;
}

.review-badge {
    display: inline-block; 
    background: #e3f2fd; 
    color: #1976d2;
    padding: 2px 6px; 
    border-radius: 8px; 
    font-size: 9px; 
    white-space: nowrap;
}

.review-badge.repurchase {
    background: #e8f5e8; 
    color: #2e7d32;
}

.review-satisfaction {
    display: flex; 
    flex-wrap: wrap; 
    gap: 8px; 
    margin: 10px 0;
    padding: 10px; 
    background: #f8f9fa; 
    border-radius: 8px;
}

.satisfaction-item {
    display: flex; 
    align-items: center; 
    gap: 4px; 
    font-size: 12px;
}

.satisfaction-label {
    color: #666;
}

.satisfaction-value {
    color: #333; 
    font-weight: 500;
}

.review-media {
    width: 100%; 
    margin: 10px 0; 
    border-radius: 8px; 
    overflow: hidden;
    background: #f0f0f0; 
    aspect-ratio: 16/9; 
    display: flex; 
    align-items: center;
    justify-content: center;
}

.review-media img {
    width: 100%; 
    height: 100%; 
    object-fit: cover;
}

.review-media iframe {
    width: 100%; 
    height: 100%; 
    border: none;
}

.media-placeholder {
    color: #999; 
    font-size: 13px; 
    text-align: center;
}

.review-text {
    color: #333; 
    line-height: 1.6; 
    font-size: 13px; 
    margin-top: 10px;
}

.review-highlight {
    color: #ff6b35; 
    font-weight: 600;
}

.slider-dots {
    display: flex; 
    justify-content: center; 
    gap: 8px; 
    margin-top: 15px;
}

.dot {
    width: 8px; 
    height: 8px; 
    border-radius: 50%; 
    background: #ccc;
    transition: all 0.3s ease; 
    cursor: pointer;
}

.dot.active {
    background: #ff6b35; 
    transform: scale(1.2);
}

/* 하단 - 신청 폼 */
.bottom-section {
    padding: 30px 20px; 
    background: #f8f9fa;
}

.form-title {
    text-align: center; 
    font-size: 20px; 
    font-weight: 700; 
    margin-bottom: 8px; 
    color: #2c3e50;
}

.form-subtitle {
    text-align: center; 
    color: #666; 
    font-size: 13px; 
    margin-bottom: 25px;
}

.step-indicator {
    display: flex; 
    justify-content: center; 
    gap: 15px; 
    margin-bottom: 25px;
}

.step {
    width: 30px; 
    height: 30px; 
    border-radius: 50%; 
    display: flex; 
    align-items: center; 
    justify-content: center;
    font-weight: bold; 
    font-size: 14px; 
    transition: all 0.3s ease;
}

.step.active {
    background: #ff6b35; 
    color: white; 
    transform: scale(1.1);
}

.step.completed {
    background: #4CAF50; 
    color: white;
}

.step.inactive {
    background: #e0e0e0; 
    color: #999;
}

.form-step {
    display: none;
}

.form-step.active {
    display: block; 
    animation: slideIn 0.4s ease-out;
}

@keyframes slideIn {
    0% { opacity: 0; transform: translateY(20px); }
    100% { opacity: 1; transform: translateY(0); }
}

.step-title {
    font-size: 16px; 
    font-weight: 600; 
    margin-bottom: 20px; 
    text-align: center; 
    color: #2c3e50;
}

.age-options {
    display: grid; 
    grid-template-columns: 1fr 1fr; 
    gap: 12px;
}

.age-option {
    padding: 12px 8px; 
    border: 2px solid #e0e0e0; 
    border-radius: 12px;
    background: #f8f9fa; 
    cursor: pointer; 
    transition: all 0.3s ease;
    text-align: center; 
    font-weight: 500; 
    font-size: 13px;
}

.age-option:hover {
    border-color: #ff6b35; 
    background: #fff5f0;
}

.age-option.selected {
    border-color: #ff6b35; 
    background: #ff6b35; 
    color: white;
    transform: scale(1.02);
}

.form-group {
    margin-bottom: 15px;
}

.form-label {
    display: block; 
    margin-bottom: 8px; 
    font-weight: 600; 
    color: #2c3e50; 
    font-size: 14px;
}

.form-input, .form-select {
    width: 100%; 
    padding: 15px; 
    border: 2px solid #e0e0e0; 
    border-radius: 10px; 
    font-size: 16px; 
    transition: all 0.3s ease;
    background: white;
}

.form-input:focus, .form-select:focus {
    outline: none; 
    border-color: #ff6b35; 
    background: white;
    box-shadow: 0 0 0 3px rgba(255,107,53,0.1);
}

.quick-input-buttons {
    display: flex; 
    gap: 8px; 
    margin-top: 8px; 
    flex-wrap: wrap;
}

.quick-btn {
    padding: 8px 12px; 
    background: #e3f2fd; 
    border: none; 
    border-radius: 6px;
    font-size: 13px; 
    color: #1976d2; 
    cursor: pointer; 
    transition: all 0.2s ease;
}

.quick-btn:hover {
    background: #bbdefb;
}

.kakao-notice {
    background: #fee500; 
    color: #3c1e1e; 
    padding: 12px; 
    border-radius: 8px;
    font-size: 12px; 
    margin-top: 15px; 
    text-align: center; 
    font-weight: 500;
}

.btn-container {
    margin-top: 20px;
}

.btn-next, .btn-submit {
    width: 100%; 
    padding: 16px; 
    border: none; 
    border-radius: 12px;
    font-size: 16px; 
    font-weight: 700; 
    cursor: pointer;
    transition: all 0.3s ease; 
    position: relative; 
    overflow: hidden;
}

.btn-next {
    background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
    color: white; 
    box-shadow: 0 4px 15px rgba(255,107,53,0.3);
}

.btn-submit {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: white; 
    box-shadow: 0 4px 15px rgba(76,175,80,0.3);
}

.btn-next:hover, .btn-submit:hover {
    transform: translateY(-2px);
}

.btn-next:disabled, .btn-submit:disabled {
    opacity: 0.6; 
    cursor: not-allowed; 
    transform: none;
}

.btn-back {
    width: 100%; 
    padding: 12px; 
    margin-top: 10px; 
    background: #f0f0f0;
    color: #666; 
    border: none; 
    border-radius: 8px; 
    cursor: pointer;
    font-size: 14px; 
    transition: all 0.3s ease;
}

.btn-back:hover {
    background: #e0e0e0;
}

/* 성공 메시지 */
.success-message {
    display: none; 
    text-align: center; 
    padding: 40px 20px;
}

.success-icon {
    font-size: 60px; 
    margin-bottom: 20px; 
    animation: bounce 1s ease-in-out;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-20px); }
    60% { transform: translateY(-10px); }
}

.success-title {
    font-size: 20px; 
    font-weight: 700; 
    color: #4CAF50; 
    margin-bottom: 10px;
}

.success-text {
    color: #666; 
    line-height: 1.5; 
    font-size: 14px;
}

/* 반응형 */
@media (max-width: 420px) {
    .main-title { font-size: 18px; }
    .spots-display { font-size: 24px; }
    .review-header { flex-wrap: wrap; }
    .review-info { flex: 1 1 100%; }
}

/* 하단 고정 버튼 - 슬림 디자인 */
.fixed-bottom-btn {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 420px;
    background: rgba(255,255,255,0.98);
    padding: 10px 15px 12px;
    box-shadow: 0 -3px 15px rgba(0,0,0,0.08);
    z-index: 999;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.apply-now-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 3px 12px rgba(255,107,53,0.3);
}

.apply-now-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 5px 15px rgba(255,107,53,0.4);
}

.btn-arrow {
    font-size: 18px;
    animation: arrowMove 1s ease-in-out infinite;
}

@keyframes arrowMove {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(5px); }
}

.btn-info {
    display: flex;
    justify-content: center;
    margin-top: 6px;
    font-size: 11px;
    color: #666;
}

.spots-left {
    color: #ff6b35;
    font-weight: 600;
}

/* 통합형 버튼 숨김 */
.fixed-bottom-container {
    display: none;
}

/* 챗봇 버튼 제거 */
.chatbot-container,
.chatbot-float-btn {
    display: none !important;
}

.apply-now-btn {
    width: 100%;
    padding: 18px;
    background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255,107,53,0.3);
    animation: btnPulse 2s ease-in-out infinite;
}

@keyframes btnPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}

.apply-now-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255,107,53,0.4);
}

.btn-arrow {
    font-size: 20px;
    animation: arrowMove 1s ease-in-out infinite;
}

@keyframes arrowMove {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(5px); }
}

.btn-info {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    font-size: 12px;
    color: #666;
}

.spots-left {
    color: #ff6b35;
    font-weight: 600;
}

/* AI 챗봇 스타일 */
.chatbot-container {
    position: fixed;
    bottom: 100px;
    right: 20px;
    width: 320px;
    height: 450px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    display: none;
    flex-direction: column;
    z-index: 998;
    animation: chatbotSlideUp 0.3s ease-out;
}

@keyframes chatbotSlideUp {
    from { transform: translateY(100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.chatbot-container.active {
    display: flex;
}

.chatbot-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px;
    border-radius: 15px 15px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chatbot-title {
    font-weight: 600;
    font-size: 16px;
}

.chatbot-close {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.3s ease;
}

.chatbot-close:hover {
    background: rgba(255,255,255,0.2);
}

.chatbot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: #f8f9fa;
}

.chat-message {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    animation: messageSlide 0.3s ease-out;
}

@keyframes messageSlide {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.chat-message.user {
    flex-direction: row-reverse;
}

.message-avatar {
    width: 35px;
    height: 35px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.chat-message.user .message-avatar {
    background: #ff6b35;
}

.message-content {
    background: white;
    padding: 12px 16px;
    border-radius: 15px;
    max-width: 70%;
    font-size: 14px;
    line-height: 1.5;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.chat-message.user .message-content {
    background: #ff6b35;
    color: white;
}

.chatbot-options {
    padding: 15px;
    background: white;
    border-top: 1px solid #eee;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    border-radius: 0 0 15px 15px;
}

.chat-option {
    flex: 1 1 calc(50% - 4px);
    padding: 10px;
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.chat-option:hover {
    background: #ff6b35;
    color: white;
    border-color: #ff6b35;
    transform: translateY(-2px);
}

/* 챗봇 플로팅 버튼 */
.chatbot-float-btn {
    position: fixed;
    bottom: 100px;
    right: 20px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    box-shadow: 0 5px 20px rgba(102,126,234,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 997;
    transition: all 0.3s ease;
    animation: floatBounce 3s ease-in-out infinite;
}

/* 데스크톱에서 챗봇 위치 */
@media (min-width: 421px) {
    .chatbot-container {
        bottom: 20px;
        right: 20px;
    }
    
    .chatbot-float-btn {
        bottom: 20px;
        right: 20px;
    }
}

@keyframes floatBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.chatbot-float-btn:hover {
    transform: scale(1.1);
}

.chatbot-icon {
    font-size: 28px;
}

.chatbot-badge {
    position: absolute;
    top: 5px;
    right: 5px;
    background: #ff3333;
    color: white;
    font-size: 11px;
    font-weight: 600;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 모바일 최적화 */
@media (max-width: 420px) {
    .chatbot-container {
        width: calc(100vw - 40px);
        right: 20px;
        left: 20px;
        bottom: 85px;
        height: 400px; /* 모바일에서 높이 줄임 */
    }
    
    .chatbot-float-btn {
        bottom: 85px;
        width: 50px; /* 모바일에서 크기 줄임 */
        height: 50px;
        right: 15px;
    }
    
    .chatbot-icon {
        font-size: 24px;
    }
    
    .container {
        padding-bottom: 100px;
    }
    
    /* 하단 버튼이 사라질 때 챗봇 위치 조정 */
    .chatbot-float-btn.bottom-hidden {
        bottom: 20px;
        transition: bottom 0.3s ease;
    }
    
    .chatbot-container.bottom-hidden {
        bottom: 20px;
        transition: bottom 0.3s ease;
    }
    
    /* 챗봇 옵션 버튼 모바일 최적화 */
    .chat-option {
        font-size: 12px;
        padding: 8px;
    }
    
    /* 하단 고정 버튼 모바일 스타일 */
    .fixed-bottom-btn {
        padding: 12px 15px 15px;
    }
    
    .apply-now-btn {
        font-size: 16px;
        padding: 15px;
    }
    
    .btn-info {
        font-size: 11px;
    }
}

/* 챗봇 입력 스타일 */
.chat-input-container {
    display: flex;
    gap: 8px;
    margin: 10px 0;
    padding: 0 10px;
}

.chat-input {
    flex: 1;
    padding: 10px;
    border: 1px solid #e0e0e0;
    border-radius: 20px;
    font-size: 14px;
    outline: none;
}

.chat-input:focus {
    border-color: #667eea;
}

.chat-submit {
    padding: 10px 20px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 20px;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.chat-submit:hover {
    background: #764ba2;
}