/* Critical CSS - Above the fold content only */
:root {
    --primary-pink: #FF4081;
    --secondary-pink: #FF1744;
    --pink-light: rgba(255, 64, 129, 0.1);
    --pink-gradient: linear-gradient(135deg, #FF4081 0%, #FF1744 100%);
    --pink-glow: 0 0 30px rgba(255, 64, 129, 0.3);
    
    --text-primary: #1a1a1a;
    --text-secondary: #666666;
    --text-light: #999999;
    --bg-primary: #ffffff;
    --bg-secondary: #fafafa;
    --bg-dark: #f5f5f5;
    
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 16px 64px rgba(0, 0, 0, 0.15);
    --shadow-pink: 0 8px 32px rgba(255, 64, 129, 0.25);
    
    --border-radius: 24px;
    --border-radius-sm: 16px;
    --border-radius-lg: 32px;
    
    --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-primary);
    overflow-x: hidden;
}

html {
    scroll-behavior: smooth;
}

.container {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    margin-top: 0;
    margin-bottom: 0;
    padding-left: 24px;
    padding-right: 24px;
    padding-top: 0;
    padding-bottom: 0;
    box-sizing: border-box;
    width: calc(100% - 48px);
    position: relative;
    left: 0;
    right: 0;
}

/* 앱 스타일 인터랙션 개선 */
*, *:before, *:after {
    -webkit-tap-highlight-color: transparent;
}

/* Hero Section - Above the fold */
.hero {
    min-height: 100vh;
    background: linear-gradient(135deg, #fafafa 0%, #f0f0f0 100%);
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at var(--mouse-x, 20%) var(--mouse-y, 30%), rgba(255, 64, 129, 0.12) 0%, transparent 50%),
        radial-gradient(circle at calc(100% - var(--mouse-x, 20%)) var(--mouse-y, 70%), rgba(135, 206, 235, 0.08) 0%, transparent 45%),
        radial-gradient(circle at var(--mouse-x, 40%) calc(100% - var(--mouse-y, 20%)), rgba(255, 23, 68, 0.06) 0%, transparent 40%),
        radial-gradient(circle at calc(50% + var(--mouse-x, 0%) * 30%) calc(50% + var(--mouse-y, 0%) * 30%), rgba(70, 130, 180, 0.05) 0%, transparent 60%);
    transition: all 0.3s ease;
    z-index: 1;
    pointer-events: none; /* 클릭 이벤트 통과 */
}

.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(ellipse at calc(30% + var(--mouse-x, 0%) * 20%) calc(60% + var(--mouse-y, 0%) * 15%), rgba(64, 224, 208, 0.06) 0%, transparent 50%),
        radial-gradient(ellipse at calc(70% - var(--mouse-x, 0%) * 15%) calc(40% - var(--mouse-y, 0%) * 20%), rgba(255, 64, 129, 0.04) 0%, transparent 45%),
        radial-gradient(ellipse at calc(85% + var(--mouse-x, 0%) * 10%) calc(20% + var(--mouse-y, 0%) * 25%), rgba(30, 144, 255, 0.07) 0%, transparent 55%);
    animation: brandColorFlow 12s ease-in-out infinite;
    z-index: 1;
    pointer-events: none; /* 클릭 이벤트 통과 */
}

@keyframes brandColorFlow {
    0%, 100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
    25% {
        opacity: 0.8;
        transform: scale(1.05) translateY(-10px);
    }
    50% {
        opacity: 0.9;
        transform: scale(0.95) translateY(5px);
    }
    75% {
        opacity: 0.85;
        transform: scale(1.02) translateY(-5px);
    }
}

.hero-content {
    position: relative;
    z-index: 20;
    text-align: center;
    animation: fadeInUp 1s ease-out;
}

/* SEO 이미지 */
.seo-image {
    position: relative;
    width: 100%;
    max-width: 600px;
    margin: -20px auto -40px auto;
    text-align: center;
}

.seo-img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

.seo-img-main {
    position: relative;
    z-index: 2;
}

.seo-img-front {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
}

.seo-img-back {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1;
}

/* 텍스트들을 이미지 위에 표시 */
.hero-title,
.main-title,
.hero-subtitle,
.hero-highlight,
.btn-group {
    position: relative;
    z-index: 15;
}

.brand-text {
    font-size: clamp(1.2rem, 3vw, 1.8rem);
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
    display: block;
    letter-spacing: -0.5px;
}

.hero-title {
    font-size: clamp(1.2rem, 3vw, 1.8rem);
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-primary);
    animation: slideInDown 1s ease-out 0.2s both;
}

.main-title {
    font-size: clamp(3rem, 8vw, 5rem);
    font-weight: 800;
    margin-bottom: 24px;
    background: var(--pink-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.1;
    animation: slideInDown 1s ease-out 0.4s both;
}

.hero-subtitle {
    font-size: clamp(1.1rem, 3vw, 1.4rem);
    color: var(--text-secondary);
    margin-bottom: 16px;
    animation: slideInDown 1s ease-out 0.4s both;
}

.hero-highlight {
    font-size: clamp(1rem, 2.5vw, 1.2rem);
    color: var(--primary-pink);
    font-weight: 600;
    margin-bottom: 48px;
    animation: slideInDown 1s ease-out 0.6s both;
}

/* Modern Buttons */
.btn-group {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
    animation: slideInUp 1s ease-out 0.8s both;
}

.btn {
    padding: 16px 32px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 16px;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    min-width: 220px;
    width: 220px;
    height: 56px;
    min-height: 56px;
    max-height: 56px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    will-change: transform;
    box-sizing: border-box;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.6s;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: var(--pink-gradient);
    color: white;
    box-shadow: var(--shadow-pink);
}

.btn-primary:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 16px 40px rgba(255, 64, 129, 0.4);
}

.btn-primary:active {
    transform: translateY(-2px) scale(0.98);
    transition: all 0.1s ease;
}

.btn-secondary {
    background: transparent;
    color: var(--primary-pink);
    border: 2px solid var(--primary-pink);
}

.btn-secondary:hover {
    background: var(--primary-pink);
    color: white;
    transform: translateY(-4px) scale(1.02);
    box-shadow: var(--shadow-pink);
}

.btn-secondary:active {
    transform: translateY(-2px) scale(0.98);
    transition: all 0.1s ease;
}

/* Essential Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(60px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-60px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(60px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Desktop Critical CSS for price cards */
@media (min-width: 769px) {
    .price-comparison {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 40px !important;
        max-width: 800px !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }
    
    /* 웹에서 main-title 위치를 위로 조정 */
    .main-title {
        margin-top: -80px;
        margin-bottom: 24px;
    }
}

/* Mobile Critical CSS */
@media (max-width: 768px) {
    .container {
        padding-left: 16px;
        padding-right: 16px;
        padding-top: 0;
        padding-bottom: 0;
        width: calc(100% - 32px);
        margin-left: auto;
        margin-right: auto;
        box-sizing: border-box;
    }
    
    .hero {
        min-height: 80vh;
        padding: 60px 0;
    }
    
    .seo-img {
        max-width: 400px !important;
    }
    
    .seo-image {
        max-width: 400px !important;
        margin: -15px auto -100px auto !important;
        text-align: center !important;
    }
    
    .btn-group {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: min(300px, calc(100vw - 32px)) !important;
        max-width: 300px !important;
        min-width: 200px !important;
        height: 56px !important;
        min-height: 56px !important;
        max-height: 56px !important;
    }
}

/* 중간 크기 모바일 (태블릿 세로, 큰 폰) */
@media (min-width: 481px) and (max-width: 768px) {
    .seo-image {
        max-width: 450px !important;
        margin: -15px auto -100px auto !important;
        text-align: center !important;
    }
    
    .seo-img {
        max-width: 420px !important;
    }
}

/* 폴드 기기 및 특수 화면 비율 대응 */
@media (max-width: 480px) {
    .seo-image {
        max-width: 350px !important;
        margin: -10px auto -80px auto !important;
        text-align: center !important;
    }
    
    .seo-img {
        max-width: 320px !important;
    }
}

/* 갤럭시 폴드 및 유사 기기 */
@media (max-width: 375px) {
    .seo-image {
        max-width: 300px !important;
        margin: -5px auto -60px auto !important;
        text-align: center !important;
    }
    
    .seo-img {
        max-width: 280px !important;
    }
}