/* 실버타운 가격 비교 스타일 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #89CFF0 0%, #4A90E2 100%);
    min-height: 100vh;
    color: #2d3436;
    overflow-x: hidden;
}

.container {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.page {
    transition: all 0.3s ease;
}

.hidden {
    display: none !important;
}

/* 시작 페이지 스타일 */
.header {
    text-align: center;
    background: rgba(255, 255, 255, 0.95);
    padding: 40px 30px;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.icon-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
}

.building-icon, .heart-icon {
    font-size: 3rem;
    animation: float 3s ease-in-out infinite;
}

.heart-icon {
    animation-delay: 1.5s;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.main-title {
    font-size: 1.7rem;
    font-weight: 800;
    color: #2d3436;
    margin-bottom: 20px;
    line-height: 1.3;
}

.subtitle-container {
    margin-bottom: 30px;
}

.feature-cards {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.feature-card {
    background: linear-gradient(45deg, #74b9ff, #0984e3);
    color: white;
    padding: 12px 20px;
    border-radius: 25px;
    font-weight: 600;
    font-size: 0.9rem;
    box-shadow: 0 8px 25px rgba(116, 185, 255, 0.3);
    transform: scale(1);
    transition: transform 0.3s ease;
}

.feature-card:hover {
    transform: scale(1.05);
}

.vs-arrow {
    font-size: 1.5rem;
    color: #fdcb6e;
}

.info-section {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
    margin-bottom: 25px;
}

.info-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px;
    background: rgba(137, 207, 240, 0.15);
    border-radius: 12px;
    border-left: 4px solid #89CFF0;
}

.info-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.info-text {
    font-weight: 600;
    color: #2d3436;
    font-size: 0.95rem;
}

.description {
    color: #636e72;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 25px;
}

.description strong {
    color: #4A90E2;
}

.price-preview {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 30px;
    padding: 20px;
    background: rgba(137, 207, 240, 0.1);
    border-radius: 15px;
    border: 2px solid rgba(137, 207, 240, 0.3);
}

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

.price-label {
    display: block;
    font-size: 0.8rem;
    color: #636e72;
    margin-bottom: 5px;
    font-weight: 600;
}

.price-value {
    display: block;
    font-size: 1.1rem;
    font-weight: 700;
    color: #4A90E2;
}

.start-btn {
    background: linear-gradient(45deg, #fdcb6e, #e17055);
    color: white;
    border: none;
    padding: 18px 36px;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(253, 203, 110, 0.4);
    text-transform: none;
}

.start-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 40px rgba(253, 203, 110, 0.5);
}

/* 질문 페이지 스타일 */
#questionPage .container {
    padding-top: 40px;
}

.progress-container {
    margin-bottom: 40px;
    text-align: center;
}

.progress-bar-bg {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    margin-bottom: 15px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #74b9ff, #0984e3);
    border-radius: 10px;
    transition: width 0.5s ease;
    width: 0%;
}

.progress-text {
    color: white;
    font-weight: 600;
    font-size: 1.1rem;
}

.question-container {
    background: rgba(255, 255, 255, 0.95);
    padding: 40px 30px;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.question-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: #2d3436;
    margin-bottom: 30px;
    text-align: center;
    line-height: 1.4;
}

.question-options {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.option-item {
    background: rgba(137, 207, 240, 0.1);
    border: 2px solid transparent;
    padding: 18px 20px;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    color: #2d3436;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.option-item:hover {
    background: rgba(137, 207, 240, 0.2);
    border-color: #89CFF0;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(137, 207, 240, 0.3);
}

.option-item.selected {
    background: linear-gradient(45deg, #89CFF0, #4A90E2);
    color: white;
    border-color: #4A90E2;
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(74, 144, 226, 0.4);
}

/* 분석 모달 스타일 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    padding: 40px 30px;
    border-radius: 20px;
    text-align: center;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.3);
}

.analysis-header h3 {
    font-size: 1.4rem;
    color: #2d3436;
    margin: 15px 0 10px 0;
    font-weight: 700;
}

.analysis-header p {
    color: #636e72;
    font-size: 0.95rem;
    margin-bottom: 30px;
}

.analysis-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.loading-animation {
    margin: 30px 0;
}

.loading-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
}

.loading-dots span {
    width: 12px;
    height: 12px;
    background: #89CFF0;
    border-radius: 50%;
    animation: loading 1.4s ease-in-out infinite both;
}

.loading-dots span:nth-child(1) { animation-delay: -0.32s; }
.loading-dots span:nth-child(2) { animation-delay: -0.16s; }

@keyframes loading {
    0%, 80%, 100% {
        transform: scale(0);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

.countdown-container {
    margin-top: 20px;
}

.countdown-circle {
    width: 60px;
    height: 60px;
    border: 3px solid #e1e8ed;
    border-top: 3px solid #89CFF0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
    animation: spin 1s linear infinite;
}

.countdown-timer {
    font-size: 1.2rem;
    font-weight: 700;
    color: #89CFF0;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.popup-ad-container {
    margin-top: 25px;
    padding: 20px;
    background: rgba(248, 249, 250, 0.8);
    border-radius: 10px;
    border: 1px solid rgba(137, 207, 240, 0.2);
}

/* 결과 페이지 스타일 */
.result-header {
    text-align: center;
    margin-bottom: 30px;
}

.result-badge {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    background: linear-gradient(45deg, #74b9ff, #0984e3);
    box-shadow: 0 15px 40px rgba(116, 185, 255, 0.3);
}

.result-title {
    font-size: 1.6rem;
    font-weight: 800;
    color: white;
    margin-bottom: 10px;
}

.result-subtitle {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
}

.result-content {
    background: rgba(255, 255, 255, 0.95);
    padding: 30px;
    border-radius: 20px;
    margin-bottom: 30px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.cost-summary {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 2px solid rgba(137, 207, 240, 0.2);
}

.cost-breakdown {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin: 20px 0;
}

.cost-item {
    background: rgba(137, 207, 240, 0.1);
    padding: 15px;
    border-radius: 10px;
    text-align: center;
}

.cost-label {
    font-size: 0.9rem;
    color: #636e72;
    margin-bottom: 5px;
    font-weight: 600;
}

.cost-amount {
    font-size: 1.2rem;
    font-weight: 700;
    color: #4A90E2;
}

.recommended-facilities {
    margin-bottom: 25px;
}

.facility-item {
    background: rgba(255, 255, 255, 0.8);
    border: 2px solid rgba(137, 207, 240, 0.2);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 15px;
    transition: all 0.3s ease;
}

.facility-item:hover {
    border-color: #89CFF0;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(137, 207, 240, 0.2);
}

.facility-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.facility-rank {
    background: linear-gradient(45deg, #fdcb6e, #e17055);
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
}

.facility-name {
    font-weight: 700;
    font-size: 1.1rem;
    color: #2d3436;
}

.facility-description {
    color: #636e72;
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 15px;
}

.facility-features {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
}

.feature-tag {
    background: rgba(137, 207, 240, 0.15);
    color: #4A90E2;
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
}

.facility-cost {
    background: rgba(253, 203, 110, 0.1);
    padding: 10px;
    border-radius: 8px;
    font-size: 0.9rem;
    color: #e17055;
    font-weight: 600;
}

.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: center;
}

.primary-btn, .kakao-share, .restart-btn {
    padding: 15px 30px;
    border: none;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 200px;
}

.primary-btn {
    background: linear-gradient(45deg, #fdcb6e, #e17055);
    color: white;
    box-shadow: 0 10px 30px rgba(253, 203, 110, 0.4);
}

.kakao-share {
    background: #FEE500;
    color: #3C1E1E;
    box-shadow: 0 10px 30px rgba(254, 229, 0, 0.4);
}

.restart-btn {
    background: rgba(255, 255, 255, 0.9);
    color: #2d3436;
    border: 2px solid rgba(137, 207, 240, 0.3);
}

.primary-btn:hover, .kakao-share:hover, .restart-btn:hover {
    transform: translateY(-2px);
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .header {
        padding: 30px 20px;
    }
    
    .main-title {
        font-size: 1.4rem;
    }
    
    .feature-cards {
        flex-direction: column;
        gap: 10px;
    }
    
    .vs-arrow {
        transform: rotate(90deg);
    }
    
    .price-preview {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .cost-breakdown {
        grid-template-columns: 1fr;
    }
    
    .question-container {
        padding: 30px 20px;
    }
    
    .question-title {
        font-size: 1.2rem;
    }
    
    .result-content {
        padding: 20px;
    }
    
    .action-buttons {
        gap: 12px;
    }
    
    .primary-btn, .kakao-share, .restart-btn {
        min-width: 100%;
        padding: 12px 20px;
    }
}

@media (max-width: 480px) {
    .main-title {
        font-size: 1.2rem;
    }
    
    .info-section {
        gap: 10px;
    }
    
    .info-card {
        padding: 12px;
    }
    
    .modal-content {
        padding: 30px 20px;
        margin: 20px;
    }
}

/* 광고 컨테이너 스타일 (새로 추가) */
.ad-container {
    width: 100%;
    margin: 20px 0;
    padding: 10px;
    text-align: center;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.ad-container.top {
    margin: 0 0 20px 0;
    background: linear-gradient(135deg, rgba(74, 144, 226, 0.1), rgba(137, 207, 240, 0.1));
    border: 1px solid rgba(74, 144, 226, 0.2);
}

.ad-container.mid {
    margin: 30px 0;
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.1), rgba(255, 140, 66, 0.1));
    border: 1px solid rgba(255, 107, 53, 0.2);
}

.ad-container.result {
    margin: 20px 0;
    background: linear-gradient(135deg, rgba(5, 150, 105, 0.1), rgba(4, 120, 87, 0.1));
    border: 1px solid rgba(5, 150, 105, 0.2);
}

.ad-container ins {
    display: block !important;
    min-height: 100px;
}

.ad-container.loading {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* 모바일 광고 최적화 (새로 추가) */
@media (max-width: 768px) {
    .ad-container {
        margin: 15px 0;
        padding: 8px;
        border-radius: 6px;
    }
    
    .ad-container ins {
        min-height: 80px;
    }
}
