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

:root {
    --bg-color: #fafafa;
    --card-bg: #ffffff;
    --text-primary: #2c3e50;
    --text-secondary: #7f8c8d;
    --accent-color: #8b6f47;
    --border-color: #e8e8e8;
    --btn-hover: #6b5638;
    --beige-light: #f5f1eb;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans KR", sans-serif;
    background: linear-gradient(135deg, var(--bg-color) 0%, var(--beige-light) 100%);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    padding: 20px;
}

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

header {
    text-align: center;
    margin-bottom: 40px;
    padding-top: 20px;
}

header h1 {
    font-size: 2rem;
    font-weight: 300;
    color: var(--text-primary);
    margin-bottom: 10px;
    letter-spacing: -0.5px;
}

.date {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 300;
}

.quote-card {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 50px 30px;
    margin-bottom: 40px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    border: 1px solid var(--border-color);
    text-align: center;
    min-height: 300px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.quote-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.1);
}

.quote-text {
    font-size: 1.5rem;
    line-height: 1.8;
    color: var(--text-primary);
    margin-bottom: 25px;
    font-weight: 400;
    letter-spacing: 0.3px;
}

.quote-author {
    font-size: 1rem;
    color: var(--accent-color);
    margin-bottom: 20px;
    font-weight: 500;
    font-style: italic;
}

.quote-comment {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.7;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    font-weight: 300;
}

.buttons-section {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.btn {
    padding: 14px 28px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    font-weight: 400;
    letter-spacing: 0.3px;
}

.btn-primary {
    background: var(--accent-color);
    color: white;
    width: 100%;
    font-size: 1.05rem;
    padding: 16px;
}

.btn-primary:hover {
    background: var(--btn-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(139, 111, 71, 0.3);
}

.mood-section {
    text-align: center;
}

.mood-title {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 15px;
    font-weight: 300;
}

.mood-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.btn-mood {
    background: white;
    color: var(--text-primary);
    border: 1.5px solid var(--border-color);
    padding: 10px 20px;
    font-size: 0.9rem;
    flex: 1;
    min-width: 100px;
    max-width: 120px;
}

.btn-mood:hover {
    background: var(--beige-light);
    border-color: var(--accent-color);
    color: var(--accent-color);
}

.btn-mood.active {
    background: var(--accent-color);
    color: white;
    border-color: var(--accent-color);
}

.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.btn-action {
    background: white;
    color: var(--text-primary);
    border: 1.5px solid var(--border-color);
    padding: 12px 20px;
}

.btn-action:hover {
    background: var(--beige-light);
    border-color: var(--accent-color);
    color: var(--accent-color);
}

/* 모바일 최적화 */
@media (max-width: 768px) {
    body {
        padding: 15px;
    }

    .container {
        padding: 15px;
    }

    header h1 {
        font-size: 1.6rem;
    }

    .quote-card {
        padding: 35px 20px;
        min-height: 250px;
    }

    .quote-text {
        font-size: 1.25rem;
        line-height: 1.7;
    }

    .quote-author {
        font-size: 0.95rem;
    }

    .quote-comment {
        font-size: 0.85rem;
    }

    .mood-buttons {
        gap: 8px;
    }

    .btn-mood {
        min-width: 80px;
        padding: 10px 16px;
        font-size: 0.85rem;
    }

    .btn {
        font-size: 0.95rem;
    }

    .intro-section,
    .categories-section,
    .how-to-section,
    .about-section {
        padding: 20px;
        margin-bottom: 30px;
    }

    .intro-section h2,
    .categories-section h2,
    .how-to-section h2,
    .about-section h2 {
        font-size: 1.3rem;
    }

    .category-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .how-to-item {
        padding: 15px;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.4rem;
    }

    .quote-text {
        font-size: 1.1rem;
    }

    .quote-card {
        padding: 30px 18px;
    }

    .mood-buttons {
        flex-direction: column;
    }

    .btn-mood {
        max-width: 100%;
        width: 100%;
    }
}

/* 섹션 스타일 */
.intro-section,
.categories-section,
.how-to-section,
.about-section {
    margin-bottom: 50px;
    padding: 30px;
    background: var(--card-bg);
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
}

.intro-section h2,
.categories-section h2,
.how-to-section h2,
.about-section h2 {
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--text-primary);
    margin-bottom: 20px;
    text-align: center;
}

.intro-text {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--text-secondary);
    text-align: center;
}

.mood-description {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 20px;
    line-height: 1.7;
    text-align: center;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.category-item {
    padding: 20px;
    background: var(--beige-light);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.category-item h3 {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--accent-color);
    margin-bottom: 12px;
}

.category-item p {
    font-size: 0.9rem;
    line-height: 1.7;
    color: var(--text-secondary);
}

.how-to-list {
    display: flex;
    flex-direction: column;
    gap: 25px;
    margin-top: 30px;
}

.how-to-item {
    padding: 20px;
    background: var(--beige-light);
    border-radius: 8px;
    border-left: 3px solid var(--accent-color);
}

.how-to-item h3 {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.how-to-item p {
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--text-secondary);
}

.about-section p {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 20px;
    text-align: justify;
}

.footer {
    margin-top: 60px;
    padding: 40px 20px;
    background: var(--card-bg);
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.footer-content {
    max-width: 700px;
    margin: 0 auto;
}

.footer p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin: 0;
}

.footer-email {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s ease;
    margin: 0 5px;
}

.footer-email:hover {
    color: var(--accent-color);
}

/* 광고 컨테이너 */
.ad-container {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 30px 0;
    min-height: 250px;
}

.ad-header {
    margin-bottom: 40px;
}

.ad-footer {
    margin-top: 40px;
}

.kakao_ad_area {
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
}

/* 공유하기 모달 */
.share-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10000;
    overflow-y: auto;
    animation: fadeIn 0.3s ease;
}

.share-modal.show {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 20px;
}

.share-modal-content {
    background: var(--card-bg);
    border-radius: 16px;
    max-width: 600px;
    width: 100%;
    margin: 40px auto;
    padding: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
}

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

.share-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.share-modal-header h2 {
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--text-primary);
    margin: 0;
}

.share-modal-close {
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s;
}

.share-modal-close:hover {
    color: var(--text-primary);
}

.share-thumbnail-container {
    width: 100%;
    margin-bottom: 25px;
    text-align: center;
}

.share-thumbnail-container img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.share-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 25px;
}

.share-option-btn {
    padding: 14px 20px;
    background: white;
    border: 1.5px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.95rem;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    font-family: inherit;
}

.share-option-btn:hover {
    background: var(--beige-light);
    border-color: var(--accent-color);
    color: var(--accent-color);
    transform: translateY(-2px);
}

.share-text-container {
    margin-bottom: 20px;
    padding: 20px;
    background: var(--beige-light);
    border-radius: 8px;
}

.share-text-container h3 {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.share-text-box {
    padding: 15px;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    min-height: 80px;
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--text-secondary);
    white-space: pre-wrap;
    word-break: break-word;
    margin-bottom: 12px;
}

.share-copy-text-btn {
    width: 100%;
    padding: 10px;
    background: var(--accent-color);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.3s;
}

.share-copy-text-btn:hover {
    background: var(--btn-hover);
}

.share-tip {
    padding: 15px;
    background: #f0f7ff;
    border-left: 4px solid #4a90e2;
    border-radius: 6px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* 로딩 애니메이션 */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

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

@media (max-width: 768px) {
    .share-modal.show {
        padding: 10px;
    }
    
    .share-modal-content {
        padding: 20px;
        margin: 20px auto;
    }
    
    .share-options {
        grid-template-columns: 1fr;
    }
    
    .share-modal-header h2 {
        font-size: 1.3rem;
    }
    
    .ad-container {
        margin: 20px 0;
        min-height: 200px;
    }
}

