/* 基本スタイル */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'YujiSyuku-Regular', 'Hiragino Sans', 'ヒラギノ角ゴ ProN W3', 'Hiragino Kaku Gothic ProN', 'メイリオ', Meiryo, sans-serif;
    line-height: 1.6;
    color: #1d1d1f;
    background-color: #f5f5f7;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background-color: #f5f5f7;
    min-height: 100vh;
}

/* ヘッダー */
.header {
    background: linear-gradient(135deg, #2E7D32 0%, #388E3C 100%);
    color: white;
    text-align: center;
    padding: 2rem;
    position: relative;
    overflow: hidden;
}

.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="white" opacity="0.1"/><circle cx="75" cy="75" r="1" fill="white" opacity="0.1"/><circle cx="25" cy="75" r="1" fill="white" opacity="0.1"/><circle cx="75" cy="25" r="1" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
}

.app-title {
    font-size: 3.5rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
    position: relative;
    z-index: 1;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.app-subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
    position: relative;
    z-index: 1;
}

/* メインコンテンツ */
.content {
    padding: 2rem;
}

/* ヒーローセクション */
.hero {
    text-align: center;
    padding: 4rem 2rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    margin: -2rem -2rem 2rem -2rem;
}

.hero-content h2 {
    font-size: 2.5rem;
    color: #2E7D32;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero-content p {
    font-size: 1.2rem;
    color: #666;
    max-width: 600px;
    margin: 0 auto;
}

/* 機能紹介 */
.features {
    margin: 4rem 0;
}

.features h2 {
    text-align: center;
    font-size: 2rem;
    color: #2E7D32;
    margin-bottom: 3rem;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.feature-item {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e5ea;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(46, 125, 50, 0.15);
}

.feature-item h3 {
    color: #2E7D32;
    font-size: 1.3rem;
    margin-bottom: 1rem;
}

.feature-item p {
    color: #666;
}

/* 使い方セクション */
.usage {
    margin: 4rem 0;
    background: #f8f9fa;
    padding: 3rem;
    border-radius: 16px;
}

.usage h2 {
    text-align: center;
    font-size: 2rem;
    color: #2E7D32;
    margin-bottom: 3rem;
}

.steps {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    max-width: 800px;
    margin: 0 auto;
}

.step {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.step-number {
    background: #2E7D32;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: bold;
    flex-shrink: 0;
}

.step-content h3 {
    color: #2E7D32;
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.step-content p {
    color: #666;
}

/* 法的文書 */
.legal-document, .help-document {
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.8;
}

.legal-document h2, .help-document h2 {
    color: #2E7D32;
    font-size: 2rem;
    margin-bottom: 1rem;
    text-align: center;
}

.last-updated {
    text-align: center;
    color: #666;
    margin-bottom: 2rem;
    font-style: italic;
}

.legal-document section, .help-section {
    margin-bottom: 2rem;
}

.legal-document h3, .help-section h3 {
    color: #2E7D32;
    font-size: 1.3rem;
    margin-bottom: 1rem;
    border-bottom: 2px solid #e5e5ea;
    padding-bottom: 0.5rem;
}

.help-item {
    margin-bottom: 2rem;
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid #2E7D32;
}

.help-item h4 {
    color: #2E7D32;
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.legal-document ul, .help-item ul {
    margin: 1rem 0 1rem 2rem;
}

.legal-document li, .help-item li {
    margin-bottom: 0.5rem;
}

/* フッター */
.footer {
    background-color: #1d1d1f;
    color: white;
    text-align: center;
    padding: 2rem;
    margin-top: 4rem;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 1rem;
}

.footer-links a {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    transition: background-color 0.3s ease;
}

.footer-links a:hover {
    background-color: #2E7D32;
}

.copyright {
    font-size: 0.9rem;
    opacity: 0.7;
}

/* ライセンス表記スタイル */
.license-item {
    border-radius: 12px;
    padding: 0 rem;
    margin-bottom: 0 rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.license-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(46, 125, 50, 0.1);
}

.license-item h4 {
    color: #2E7D32;
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.license-item p {
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
    line-height: 1.5;
}

.license-item strong {
    font-weight: 600;
}

.license-item ul {
    margin: 0.5rem 0 0.5rem 1rem;
    padding-left: 1rem;
}

.license-item li {
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    line-height: 1.4;
}

.toggle-license {
    background: #2E7D32;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.9rem;
    cursor: pointer;
    margin-top: 0.5rem;
    transition: background-color 0.2s ease;
}

.toggle-license:hover {
    background: #1B5E20;
}

.license-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    margin-top: 1rem;
}

.license-content.expanded {
    max-height: 1000px;
}

.license-full-text {
    background: #f8f9fa;
    border: 1px solid #e5e5ea;
    border-radius: 8px;
    padding: 1rem;
    font-family: 'Monaco', 'Menlo', 'Consolas', monospace;
    font-size: 0.85rem;
    line-height: 1.5;
    color: #555;
    white-space: pre-line;
}

.license-text {
    background: #f1f3f4;
    padding: 1.5rem;
    border-radius: 8px;
    font-family: 'Monaco', 'Menlo', 'Consolas', monospace;
    font-size: 0.9rem;
    line-height: 1.6;
    margin-top: 1rem;
}

.license-text a {
    color: #2E7D32;
    text-decoration: none;
}

.license-text a:hover {
    text-decoration: underline;
}

.preface {

    border-left: 4px solid #2E7D32;
    padding: 1rem 1.5rem;
    margin-bottom: 2rem;
    border-radius: 0 8px 8px 0;
    font-size: 1rem;
    line-height: 1.6;
}

/* レスポンシブデザイン */
@media (max-width: 768px) {
    
    .header {
        padding: 1.5rem;
    }
    
    .app-title {
        font-size: 2.5rem;
    }
    
    .content {
        padding: 1rem;
    }
    
    .hero {
        padding: 2rem 1rem;
        margin: -1rem -1rem 1rem -1rem;
    }
    
    .hero-content h2 {
        font-size: 1.8rem;
    }
    
    .feature-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .feature-item {
        padding: 1.5rem;
    }
    
    .usage {
        margin: 2rem 0;
        padding: 1.5rem;
    }
    
    .step {
        flex-direction: column;
        text-align: center;
    }
    
    .step-number {
        margin: 0 auto;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .legal-document, .help-document {
        padding: 0 1rem;
    }
    
    .help-item {
        padding: 1rem;
    }
    
    /* ライセンス表記のモバイル対応 */
    .license-item {
        margin-bottom: 1rem;
        padding: 1rem;
    }
    
    .license-item h4 {
        font-size: 1.1rem;
        line-height: 1.3;
        margin-bottom: 0.75rem;
    }
    
    .license-item p {
        font-size: 0.9rem;
        line-height: 1.4;
        margin-bottom: 0.5rem;
    }
    
    .license-item ul {
        margin: 0.5rem 0 0.5rem 0.5rem;
        padding-left: 1rem;
    }
    
    .license-item li {
        font-size: 0.85rem;
        line-height: 1.3;
        margin-bottom: 0.4rem;
    }
    
    .toggle-license {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
        margin-top: 0.5rem;
    }
    
    .license-full-text {
        font-size: 0.75rem;
        line-height: 1.4;
        padding: 0.8rem;
    }
    
    .preface {
        padding: 0.8rem 1rem;
        margin-bottom: 1.5rem;
        font-size: 0.9rem;
        line-height: 1.5;
    }
    
    /* フッターリンクのモバイル最適化 */
    .footer-links a {
        font-size: 0.9rem;
        padding: 0.6rem 1rem;
    }
}

/* さらに小さい画面（スマートフォン縦画面）への対応 */
@media (max-width: 480px) {
    .app-title {
        font-size: 2rem;
    }
    
    .app-subtitle {
        font-size: 1rem;
    }
    
    .content {
        padding: 0.5rem;
    }
    
    .license-item {
        padding: 0.8rem;
        margin-bottom: 0.8rem;
    }
    
    .license-item h4 {
        font-size: 1rem;
        line-height: 1.2;
    }
    
    .license-item p {
        font-size: 0.85rem;
    }
    
    .license-item li {
        font-size: 0.8rem;
    }
    
    .toggle-license {
        font-size: 0.75rem;
        padding: 0.3rem 0.6rem;
        width: 100%;
        text-align: center;
    }
    
    .license-full-text {
        font-size: 0.7rem;
        line-height: 1.3;
        padding: 0.6rem;
    }
    
    .preface {
        padding: 0.6rem 0.8rem;
        font-size: 0.85rem;
    }
    
    .legal-document h2 {
        font-size: 1.5rem;
    }
    
    .legal-document h3 {
        font-size: 1.2rem;
    }
}

/* ダークモード対応 */
@media (prefers-color-scheme: dark) {
    body {
        background-color: #1d1d1f;
        color: #f5f5f7;
    }
    
    .container {
        background-color: #1d1d1f;
    }
    
    .hero {
        background: linear-gradient(135deg, #2d2d30 0%, #1d1d1f 100%);
    }
    
    .feature-item, .step, .help-item {
        background-color: #2d2d30;
        border-color: #3d3d40;
    }
    
    .usage {
        background-color: #2d2d30;
    }
    
    .hero-content p, .feature-item p, .step-content p {
        color: #a1a1a6;
    }
}