/* WWWAI.site Markdown 페이지 전용 CSS */
/* 우주 테마 디자인 */

/* 기본 리셋 및 전역 설정 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 우주 배경 효과 */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: radial-gradient(ellipse at center, #1a1a2e 0%, #16213e 50%, #0f1419 100%);
    min-height: 100vh;
    color: #e0e0e0;
    line-height: 1.6;
    position: relative;
    overflow-x: hidden;
}

/* 별과 네뷸라 배경 효과 */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(2px 2px at 20px 30px, #eee, transparent),
        radial-gradient(2px 2px at 40px 70px, rgba(255,255,255,0.8), transparent),
        radial-gradient(1px 1px at 90px 40px, #fff, transparent),
        radial-gradient(1px 1px at 130px 80px, rgba(255,255,255,0.6), transparent),
        radial-gradient(2px 2px at 160px 30px, #ddd, transparent);
    background-repeat: repeat;
    background-size: 200px 100px;
    z-index: -1;
    opacity: 0.3;
    animation: stars 20s linear infinite;
}

@keyframes stars {
    from { transform: translateY(0px); }
    to { transform: translateY(-100px); }
}

/* 네뷸라 효과 */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(ellipse at 30% 20%, rgba(120, 119, 198, 0.3) 0%, transparent 50%),
        radial-gradient(ellipse at 70% 80%, rgba(255, 119, 198, 0.2) 0%, transparent 50%),
        radial-gradient(ellipse at 90% 30%, rgba(119, 255, 198, 0.15) 0%, transparent 50%);
    z-index: -1;
    animation: nebula 30s ease-in-out infinite alternate;
}

@keyframes nebula {
    0% { transform: scale(1) rotate(0deg); opacity: 0.3; }
    100% { transform: scale(1.1) rotate(5deg); opacity: 0.5; }
}

/* 컨테이너 */
.markdown-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    position: relative;
    margin-top: 4rem;
    margin-bottom: 4rem;
}

/* 네비게이션 */
.nav-link {
    position: absolute;
    top: 20px;
    left: 20px;
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 25px;
    color: #e0e0e0;
    text-decoration: none;
    font-size: 0.9rem;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(120, 119, 198, 0.5);
    color: #fff;
    transform: translateY(-2px);
}

.nav-link::before {
    content: '←';
    margin-right: 0.5rem;
    font-size: 1.1rem;
}

/* 페이지 메타데이터 */
.page-meta {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 15px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    backdrop-filter: blur(10px);
}

.page-meta h4 {
    color: #7877c6;
    font-size: 1.1rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.page-meta p {
    margin: 0.5rem 0;
    color: #b0b0b0;
    font-size: 0.9rem;
}

.page-meta strong {
    color: #e0e0e0;
}

/* 마크다운 콘텐츠 */
.markdown-content {
    position: relative;
}

/* 제목들 */
.markdown-content h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #fff;
    margin: 2rem 0 1.5rem 0;
    text-align: center;
    background: linear-gradient(135deg, #7877c6, #ff77c6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 30px rgba(120, 119, 198, 0.3);
}

.markdown-content h2 {
    font-size: 2rem;
    font-weight: 600;
    color: #7877c6;
    margin: 2rem 0 1rem 0;
    position: relative;
    padding-bottom: 0.5rem;
}

.markdown-content h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #7877c6, transparent);
    border-radius: 2px;
}

.markdown-content h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #9999ff;
    margin: 1.5rem 0 1rem 0;
}

.markdown-content h4 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #b3b3ff;
    margin: 1.25rem 0 0.75rem 0;
}

/* 문단 */
.markdown-content p {
    margin: 1rem 0;
    color: #d0d0d0;
    line-height: 1.7;
}

/* 강조 텍스트 */
.markdown-content strong {
    color: #fff;
    font-weight: 600;
}

.markdown-content em {
    color: #ff77c6;
    font-style: italic;
}

/* 링크 */
.markdown-content a {
    color: #7877c6;
    text-decoration: none;
    position: relative;
    transition: all 0.3s ease;
}

.markdown-content a:hover {
    color: #9999ff;
}

.markdown-content a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #7877c6, #ff77c6);
    transition: width 0.3s ease;
}

.markdown-content a:hover::after {
    width: 100%;
}

/* 리스트 */
.markdown-content ul, .markdown-content ol {
    margin: 1rem 0;
    padding-left: 2rem;
}

.markdown-content li {
    margin: 0.5rem 0;
    color: #d0d0d0;
    position: relative;
}

.markdown-content ul li::marker {
    color: #7877c6;
}

.markdown-content ol li::marker {
    color: #7877c6;
    font-weight: 600;
}

/* 인용문 */
.markdown-content blockquote {
    border-left: 4px solid #7877c6;
    background: rgba(120, 119, 198, 0.05);
    margin: 1.5rem 0;
    padding: 1rem 1.5rem;
    border-radius: 0 10px 10px 0;
    font-style: italic;
    color: #e0e0e0;
    position: relative;
}

.markdown-content blockquote::before {
    content: '"';
    font-size: 3rem;
    color: #7877c6;
    position: absolute;
    top: -10px;
    left: 10px;
    opacity: 0.3;
}

/* 코드 */
.markdown-content code {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    padding: 0.2rem 0.4rem;
    font-family: 'Fira Code', 'Monaco', 'Consolas', monospace;
    font-size: 0.9rem;
    color: #ff77c6;
}

.markdown-content pre {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1.5rem;
    margin: 1.5rem 0;
    overflow-x: auto;
    position: relative;
    backdrop-filter: blur(10px);
}

.markdown-content pre code {
    background: none;
    border: none;
    padding: 0;
    color: #e0e0e0;
    font-size: 0.9rem;
    line-height: 1.5;
}

/* 코드 블록에 언어 표시 */
.markdown-content pre::before {
    content: 'elixir';
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 0.8rem;
    color: #7877c6;
    background: rgba(120, 119, 198, 0.2);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    text-transform: uppercase;
    font-weight: 600;
}

/* 테이블 */
.markdown-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 10px;
    overflow: hidden;
}

.markdown-content th,
.markdown-content td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.markdown-content th {
    background: rgba(120, 119, 198, 0.2);
    color: #fff;
    font-weight: 600;
}

.markdown-content td {
    color: #d0d0d0;
}

.markdown-content tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

/* 구분선 */
.markdown-content hr {
    border: none;
    height: 2px;
    background: linear-gradient(90deg, transparent, #7877c6, transparent);
    margin: 2rem 0;
    border-radius: 1px;
}

/* 이미지 */
.markdown-content img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    margin: 1rem 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* 이모지 개선 */
.markdown-content p:has-emoji,
.markdown-content li:has-emoji {
    font-size: 1.1rem;
}

/* 플로팅 애니메이션 */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.markdown-container {
    animation: float 6s ease-in-out infinite;
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .markdown-container {
        margin: 2rem 1rem;
        padding: 1.5rem;
        border-radius: 15px;
    }
    
    .nav-link {
        position: static;
        margin-bottom: 2rem;
        display: inline-flex;
    }
    
    .markdown-content h1 {
        font-size: 2rem;
    }
    
    .markdown-content h2 {
        font-size: 1.5rem;
    }
    
    .markdown-content pre {
        padding: 1rem;
        margin: 1rem -1rem;
        border-radius: 0;
    }
    
    .page-meta {
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    .markdown-container {
        margin: 1rem 0.5rem;
        padding: 1rem;
    }
    
    .markdown-content h1 {
        font-size: 1.75rem;
    }
    
    .markdown-content pre {
        font-size: 0.8rem;
    }
}

/* 스크롤바 스타일링 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #7877c6, #ff77c6);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #9999ff, #ff99d6);
}

/* 선택 텍스트 스타일 */
::selection {
    background: rgba(120, 119, 198, 0.3);
    color: #fff;
}

::-moz-selection {
    background: rgba(120, 119, 198, 0.3);
    color: #fff;
} 