/* 메인 페이지 전용 스타일 - 가독성 개선 버전 */

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

/* Hero Section - 가독성 개선 */
.hero-section {
    text-align: center;
    padding: 4rem 2rem;
    background: rgba(255, 255, 255, 0.35);
    backdrop-filter: blur(25px);
    border: 2px solid rgba(255, 255, 255, 0.5);
    box-shadow: 
        0 15px 50px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.main-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.title-text {
    font-size: 3.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, #1a202c, #2d3748, #4a5568);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.4),
        0 2px 6px rgba(255, 255, 255, 0.8);
    letter-spacing: -0.02em;
}

.title-emoji {
    font-size: 3.5rem;
    animation: bounce 2.5s ease-in-out infinite;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
}

.subtitle {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1a202c;
    margin-bottom: 2.5rem;
    text-shadow: 
        0 2px 6px rgba(255, 255, 255, 0.9),
        0 4px 12px rgba(0, 0, 0, 0.2);
    letter-spacing: -0.01em;
}

.hero-description {
    font-size: 1.2rem;
    color: #2d3748;
    line-height: 1.8;
    font-weight: 600;
    text-shadow: 
        0 1px 3px rgba(255, 255, 255, 0.8),
        0 3px 6px rgba(0, 0, 0, 0.15);
}

.hero-description p {
    margin-bottom: 1rem;
}

/* Tests Grid - 개선된 레이아웃 */
.tests-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
    margin: 3rem 0;
}

.test-card {
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    padding: 3rem 2.5rem;
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(25px);
    border: 2px solid rgba(255, 255, 255, 0.6);
    box-shadow: 
        0 10px 30px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.test-card:hover {
    transform: translateY(-12px) scale(1.03);
    background: rgba(255, 255, 255, 0.5);
    border-color: rgba(255, 255, 255, 0.8);
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

/* 터치 디바이스 지원 */
.test-card.touch-active {
    transform: translateY(-8px) scale(1.02);
    background: rgba(255, 255, 255, 0.45);
    border-color: rgba(255, 255, 255, 0.7);
}

.test-hover-effect {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.05));
    opacity: 0;
    transition: opacity 0.4s ease;
    border-radius: 24px;
}

.test-card:hover .test-hover-effect {
    opacity: 1;
}

.test-emoji {
    font-size: 4.5rem;
    text-align: center;
    margin-bottom: 2rem;
    animation: float 4s ease-in-out infinite;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
}

.test-content {
    text-align: center;
}

.test-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 1.5rem;
    text-shadow: 
        0 2px 6px rgba(255, 255, 255, 0.9),
        0 4px 12px rgba(0, 0, 0, 0.2);
    letter-spacing: -0.01em;
    line-height: 1.3;
}

.test-description {
    font-size: 1.1rem;
    color: #2d3748;
    line-height: 1.7;
    margin-bottom: 2rem;
    font-weight: 600;
    text-shadow: 
        0 1px 3px rgba(255, 255, 255, 0.8),
        0 3px 6px rgba(0, 0, 0, 0.15);
}

.test-tags {
    display: flex;
    justify-content: center;
    gap: 0.8rem;
    flex-wrap: wrap;
}

.tag {
    background: rgba(102, 126, 234, 0.2);
    color: #2b5ce6;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 700;
    border: 2px solid rgba(102, 126, 234, 0.4);
    backdrop-filter: blur(15px);
    text-shadow: 
        0 1px 2px rgba(255, 255, 255, 0.8),
        0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.tag:hover {
    background: rgba(102, 126, 234, 0.3);
    border-color: rgba(102, 126, 234, 0.6);
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    color: #1a365d;
}

/* Footer Section - 간단한 버전 */
.footer-section {
    background: rgba(255, 255, 255, 0.35);
    backdrop-filter: blur(25px);
    border: 2px solid rgba(255, 255, 255, 0.5);
    margin-top: auto;
    padding: 2rem;
}

.footer-bottom {
    text-align: center;
    color: #2d3748;
    font-size: 0.9rem;
    font-weight: 500;
}

.footer-bottom p {
    margin: 0;
    text-shadow: 
        0 1px 2px rgba(255, 255, 255, 0.6),
        0 2px 4px rgba(0, 0, 0, 0.1);
}

.social-share {
    margin-top: 2.5rem;
}

.share-btn {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 1.2rem 2.5rem;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 
        0 8px 25px rgba(102, 126, 234, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    letter-spacing: -0.01em;
}

.share-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 
        0 12px 35px rgba(102, 126, 234, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.share-btn:active {
    transform: translateY(-1px) scale(1.02);
}

/* 접근성 개선 */
.test-card:focus {
    outline: 3px solid #667eea;
    outline-offset: 2px;
}

.share-btn:focus {
    outline: 3px solid #2d3748;
    outline-offset: 2px;
}

/* 로딩 상태 및 애니메이션 개선 */
.loaded .test-card {
    animation: slideInUp 0.6s ease-out;
}

.test-card.in-view {
    animation: pulseGlow 2s ease-in-out infinite;
}

/* 텍스트 가독성 향상을 위한 추가 스타일 */
.text-enhanced {
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* 알림 스타일 */
.notification {
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

.notification-icon {
    flex-shrink: 0;
    font-size: 1.2em;
}

.notification-text {
    flex: 1;
    line-height: 1.4;
}

/* 애니메이션 개선 */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulseGlow {
    0%, 100% {
        box-shadow: 
            0 10px 30px rgba(0, 0, 0, 0.15),
            inset 0 1px 0 rgba(255, 255, 255, 0.4);
    }
    50% {
        box-shadow: 
            0 15px 40px rgba(102, 126, 234, 0.2),
            inset 0 1px 0 rgba(255, 255, 255, 0.5);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    33% {
        transform: translateY(-8px) rotate(2deg);
    }
    66% {
        transform: translateY(-4px) rotate(-2deg);
    }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0) scale(1);
    }
    40% {
        transform: translateY(-12px) scale(1.05);
    }
    60% {
        transform: translateY(-6px) scale(1.02);
    }
}

/* Responsive Design - 가독성 우선 */
@media (max-width: 768px) {
    .container {
        padding: 1.5rem;
        gap: 2rem;
    }
    
    .title-text {
        font-size: 2.8rem;
    }
    
    .title-emoji {
        font-size: 2.8rem;
    }
    
    .subtitle {
        font-size: 1.3rem;
    }
    
    .hero-description {
        font-size: 1.1rem;
    }
    
    .tests-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .test-card {
        padding: 2.5rem 2rem;
    }
    
    .test-emoji {
        font-size: 3.5rem;
    }
    
    .test-title {
        font-size: 1.6rem;
    }
    
    .test-description {
        font-size: 1rem;
    }
    
    .glass-card {
        padding: 2rem;
        border-radius: 20px;
    }
    
    .hero-section {
        padding: 3rem 2rem;
    }
    
    .footer-section {
        padding: 1.5rem;
    }
    
    /* 터치 디바이스에서 호버 효과 조정 */
    @media (hover: none) {
        .test-card:hover {
            transform: none;
            background: rgba(255, 255, 255, 0.4);
            box-shadow: 
                0 10px 30px rgba(0, 0, 0, 0.15),
                inset 0 1px 0 rgba(255, 255, 255, 0.4);
        }
        
        .tag:hover {
            transform: none;
        }
    }
}

@media (max-width: 480px) {
    .container {
        padding: 1rem;
    }
    
    .title-text {
        font-size: 2.2rem;
    }
    
    .title-emoji {
        font-size: 2.2rem;
    }
    
    .subtitle {
        font-size: 1.2rem;
    }
    
    .hero-description {
        font-size: 1rem;
    }
    
    .test-title {
        font-size: 1.4rem;
    }
    
    .test-description {
        font-size: 0.95rem;
    }
    
    .test-card {
        padding: 2rem 1.5rem;
    }
    
    .hero-section {
        padding: 2.5rem 1.5rem;
    }
    
    .footer-section {
        padding: 2rem 1rem;
    }
    
    .main-title {
        gap: 1rem;
    }
    
    .tag {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }
    
    /* 모바일에서 알림 위치 조정 */
    .notification {
        top: 20px !important;
        right: 15px !important;
        left: 15px !important;
        max-width: none !important;
        transform: translateY(-100%) !important;
        transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
    }
    
    .notification.show {
        transform: translateY(0) !important;
    }
}

/* 초소형 화면 (320px 이하) */
@media (max-width: 320px) {
    .title-text {
        font-size: 1.8rem;
    }
    
    .title-emoji {
        font-size: 1.8rem;
    }
    
    .test-emoji {
        font-size: 3rem;
    }
    
    .test-title {
        font-size: 1.2rem;
    }
    
    .hero-section {
        padding: 2rem 1rem;
    }
    
    .test-card {
        padding: 1.5rem 1rem;
    }
}

/* 고대비 모드 지원 */
@media (prefers-contrast: high) {
    .title-text {
        background: linear-gradient(135deg, #000000, #2d3748);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
    }
    
    .test-card {
        border-width: 3px;
        border-color: rgba(0, 0, 0, 0.5);
    }
    
    .test-title, .subtitle, .footer-section h3 {
        color: #1a202c;
        text-shadow: none;
    }
    
    .test-description, .hero-description, .footer-section p {
        color: #2d3748;
        text-shadow: none;
    }
    
    .tag {
        background: rgba(0, 0, 0, 0.1);
        color: #1a202c;
        border-color: rgba(0, 0, 0, 0.3);
    }
}

/* 다크모드 지원 */
@media (prefers-color-scheme: dark) {
    .hero-section {
        background: rgba(0, 0, 0, 0.3);
        border-color: rgba(255, 255, 255, 0.3);
    }
    
    .test-card {
        background: rgba(0, 0, 0, 0.25);
        border-color: rgba(255, 255, 255, 0.4);
    }
    
    .footer-section {
        background: rgba(0, 0, 0, 0.3);
        border-color: rgba(255, 255, 255, 0.3);
    }
    
    .title-text {
        background: linear-gradient(135deg, #f7fafc, #e2e8f0, #cbd5e0);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
    }
    
    .subtitle, .test-title, .footer-section h3 {
        color: #f7fafc;
        text-shadow: 0 2px 6px rgba(0, 0, 0, 0.8);
    }
    
    .test-description, .hero-description, .footer-section p {
        color: #e2e8f0;
        text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
    }
    
    .tag {
        background: rgba(255, 255, 255, 0.1);
        color: #cbd5e0;
        border-color: rgba(255, 255, 255, 0.2);
    }
}

/* 큰 화면에서의 최적화 */
@media (min-width: 1400px) {
    .container {
        max-width: 1400px;
        padding: 3rem 2rem;
    }
    
    .tests-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 3rem;
    }
    
    .test-card {
        padding: 3.5rem 3rem;
    }
    
    .title-text {
        font-size: 4rem;
    }
    
    .title-emoji {
        font-size: 4rem;
    }
}

/* 움직임 줄이기 선호도 지원 */
@media (prefers-reduced-motion: reduce) {
    .test-card,
    .share-btn,
    .tag {
        transition: none;
    }
    
    .test-emoji,
    .title-emoji {
        animation: none;
    }
    
    .test-card:hover {
        transform: none;
    }
    
    .notification {
        transition: opacity 0.3s ease;
    }
}

/* Print 스타일 */
@media print {
    .test-card:hover {
        transform: none;
        background: white;
        border: 2px solid #ccc;
    }
    
    .hero-section, .footer-section {
        background: white;
        border: 2px solid #ccc;
    }
    
    .title-text, .test-title, .subtitle {
        color: black !important;
        text-shadow: none !important;
        -webkit-text-fill-color: black !important;
    }
    
    .test-description, .hero-description, .footer-section p {
        color: #333 !important;
        text-shadow: none !important;
    }
    
    .tag {
        background: #f0f0f0 !important;
        color: #333 !important;
        border-color: #ccc !important;
    }
    
    .notification {
        display: none !important;
    }
}

/* 전체 텍스트 가독성 향상 */
* {
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* 선택 가능한 텍스트 스타일링 */
::selection {
    background: rgba(102, 126, 234, 0.3);
    color: #2d3748;
}

::-moz-selection {
    background: rgba(102, 126, 234, 0.3);
    color: #2d3748;
} 