:root {
    /* Light mode colors */
    --bg-color: #ffffff;
    --text-color: #1d1d1f;
    --text-secondary: #6e6e73;
    --card-bg: #f5f5f7;
    --border-color: #d2d2d7;
    --primary-color: #007aff;
    --primary-hover: #0056b3;
    --success-color: #34c759;
    --accent-bg: #f0f8ff;
    --shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 8px 24px rgba(0, 0, 0, 0.15);
}

/* Dark mode colors */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-color: #000000;
        --text-color: #f5f5f7;
        --text-secondary: #a1a1a6;
        --card-bg: #1c1c1e;
        --border-color: #38383a;
        --primary-color: #0a84ff;
        --primary-hover: #409cff;
        --success-color: #32d74b;
        --accent-bg: #001f3f;
        --shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
        --shadow-hover: 0 8px 24px rgba(0, 0, 0, 0.4);
    }
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    font-size: 16px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.container {
    max-width: 1024px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
header {
    background-color: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.app-info {
    display: flex;
    align-items: center;
    gap: 16px;
}

.app-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    box-shadow: var(--shadow);
}

.app-info h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 1rem;
}

.download-btn {
    display: inline-block;
    transition: transform 0.2s ease;
}

.download-btn:hover {
    transform: translateY(-2px);
}

.app-store-badge {
    height: 50px;
    transition: all 0.2s ease;
    display: block;
}

/* 다크모드에서 흰 배경 배지로 전환 - 더 안정적인 방법 */
.app-store-badge-dark {
    display: none;
}

@media (prefers-color-scheme: dark) {
    .app-store-badge {
        display: none;
    }
    
    .app-store-badge-dark {
        display: block;
        height: 50px;
        transition: all 0.2s ease;
    }
}

/* Main content */
main {
    padding: 40px 0;
}

/* Intro section */
.intro-description {
    font-size: 1.1rem;
    line-height: 1.7;
    color: var(--text-secondary);
    margin-bottom: 32px;
    text-align: left;
}

.intro-highlights {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.highlight-item {
    text-align: center;
    padding: 24px;
    background: var(--bg-color);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
}

.highlight-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
    border-color: var(--primary-color);
}

.highlight-icon {
    font-size: 2.5rem;
    margin-bottom: 16px;
}

.highlight-item h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-color);
}

.highlight-item p {
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 0;
}

section {
    margin-bottom: 40px;
}

.card {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 32px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

h2 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--text-color);
}

h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-color);
}


/* Features section */
.feature-category {
    margin-bottom: 32px;
}

.feature-category:last-child {
    margin-bottom: 0;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 12px;
    margin-bottom: 24px;
}

.feature-item {
    background: var(--bg-color);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 12px 16px;
    text-align: center;
    font-weight: 600;
    transition: all 0.2s ease;
}

.feature-item:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.feature-list {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 12px;
}

.feature-list li {
    padding: 12px 16px;
    background: var(--bg-color);
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
    transition: transform 0.2s ease;
}

.feature-list li:hover {
    transform: translateX(4px);
}

/* Guide section */
.guide-step {
    margin-bottom: 32px;
    padding: 24px;
    background: var(--bg-color);
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.guide-step:last-child {
    margin-bottom: 0;
}

.guide-step ol {
    margin-left: 20px;
    margin-top: 12px;
}

.guide-step li {
    margin-bottom: 8px;
    padding-left: 8px;
}

/* FAQ section */
.faq-item {
    margin-bottom: 24px;
    padding: 24px;
    background: var(--bg-color);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
}

.faq-item:hover {
    border-color: var(--primary-color);
    transform: translateY(-1px);
}

.faq-item:last-child {
    margin-bottom: 0;
}

.faq-item h3 {
    color: var(--primary-color);
    margin-bottom: 12px;
}

.faq-item p {
    color: var(--text-secondary);
    line-height: 1.7;
}

/* Contact section */
.contact-intro {
    color: var(--text-secondary);
    margin-bottom: 32px;
    text-align: center;
}

.contact-email {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 32px;
    background: var(--bg-color);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
}

.contact-email:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
    border-color: var(--primary-color);
}

.email-icon {
    font-size: 3rem;
    flex-shrink: 0;
}

.email-info h3 {
    margin-bottom: 8px;
    font-size: 1.25rem;
    color: var(--text-color);
}

.email-display {
    position: relative;
    display: inline-block;
    cursor: pointer;
    padding: 12px 16px;
    background: var(--bg-color);
    border: 2px solid var(--primary-color);
    border-radius: 8px;
    transition: all 0.2s ease;
}

.email-display:hover {
    background: var(--accent-bg);
    transform: translateY(-1px);
}

.email-display span {
    color: var(--primary-color);
    font-size: 1.1rem;
    font-weight: 600;
    font-family: 'Menlo', 'Monaco', 'Courier New', monospace;
}

/* CSS Pseudo Elements로 이메일 주소 표시 (크롤러 방지) */
.email-pseudo::before {
    content: 'developer';
}

.email-pseudo::after {
    content: '@saturnsky.io';
}

.email-copy-hint {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 4px;
    text-align: center;
}

.email-copy-success {
    color: var(--success-color) !important;
    font-weight: 600;
}

.email-description {
    margin: 8px 0 0 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.email-template-notice {
    margin: 12px 0 0 0;
    color: var(--primary-color);
    font-size: 0.9rem;
    font-weight: 600;
    padding: 8px 12px;
    background: var(--accent-bg);
    border-radius: 6px;
    border-left: 3px solid var(--primary-color);
}

/* Email Templates */
.email-templates {
    margin-top: 32px;
    padding-top: 32px;
    border-top: 1px solid var(--border-color);
}

.email-templates h3 {
    margin-bottom: 12px;
    color: var(--text-color);
}

.templates-description {
    color: var(--text-secondary);
    margin-bottom: 24px;
    font-size: 0.9rem;
}

.template-item {
    margin-bottom: 16px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
}

.template-header {
    width: 100%;
    background: var(--card-bg);
    border: none;
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.template-header:hover {
    background: var(--border-color);
}

.template-title {
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-color);
}

.template-arrow {
    color: var(--text-secondary);
    transition: transform 0.2s ease;
    font-size: 0.8rem;
}

.template-header.active .template-arrow {
    transform: rotate(180deg);
}

.template-content {
    display: none;
    background: var(--bg-color);
}

.template-content.active {
    display: block;
}

.template-text {
    padding: 20px;
    background: var(--bg-color);
    border: 2px dashed var(--border-color);
    margin: 16px;
    border-radius: 8px;
    font-family: 'Menlo', 'Monaco', 'Courier New', monospace;
    font-size: 0.85rem;
    line-height: 1.6;
    color: var(--text-color);
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: pre-line;
}

.template-text:hover {
    border-color: var(--primary-color);
    background: var(--accent-bg);
}

.copy-indicator {
    text-align: center;
    padding: 8px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    background: var(--card-bg);
}

.copy-success {
    color: var(--success-color) !important;
    font-weight: 600;
}


/* Footer */
footer {
    background: var(--card-bg);
    border-top: 1px solid var(--border-color);
    padding: 32px 0;
    margin-top: 60px;
}

.footer-content {
    text-align: center;
    color: var(--text-secondary);
}

.footer-content p {
    margin-bottom: 8px;
}

.footer-content a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-content a:hover {
    color: var(--primary-hover);
}

.footer-email-pseudo {
    color: var(--primary-color);
    cursor: pointer;
    text-decoration: underline;
    transition: all 0.2s ease;
    font-family: 'Menlo', 'Monaco', 'Courier New', monospace;
    position: relative;
}

.footer-email-pseudo:hover {
    color: var(--primary-hover);
    transform: translateY(-1px);
}

.footer-email-pseudo::before {
    content: 'developer';
}

.footer-email-pseudo::after {
    content: '@saturnsky.io';
}

/* 호버 시 복사 힌트 표시 */
.footer-email-pseudo:hover::after {
    content: '@saturnsky.io (클릭하여 복사)';
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* 복사 상태일 때 pseudo elements 비활성화 */
.footer-email-pseudo.copying::before,
.footer-email-pseudo.copying::after {
    display: none;
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        padding: 0 16px;
    }
    
    .header-content {
        flex-direction: column;
        text-align: center;
        gap: 16px;
    }
    
    .app-info {
        flex-direction: column;
        text-align: center;
        gap: 12px;
    }
    
    .app-info h1 {
        font-size: 1.75rem;
    }
    
    .card {
        padding: 24px;
    }
    
    .feature-grid {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
        gap: 8px;
    }
    
    .feature-list {
        grid-template-columns: 1fr;
    }
    
    .intro-highlights {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .intro-description {
        font-size: 1rem;
        margin-bottom: 24px;
    }
    
    .contact-email {
        flex-direction: column;
        text-align: center;
        gap: 16px;
        padding: 24px;
    }
    
    .template-text {
        font-size: 0.8rem;
        padding: 16px;
        margin: 12px;
    }
    
    .template-header {
        padding: 12px 16px;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    h3 {
        font-size: 1.125rem;
    }
}

@media (max-width: 480px) {
    .app-icon {
        width: 48px;
        height: 48px;
        border-radius: 12px;
    }
    
    .card {
        padding: 20px;
    }
    
    
    .feature-grid {
        grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    }
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Focus styles for accessibility */
button:focus,
input:focus,
textarea:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Loading animation for form submission */
.submit-btn.loading {
    position: relative;
    color: transparent;
}

.submit-btn.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid transparent;
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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