/* === リセット & ベース === */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans JP', sans-serif;
    background: #f5f7fa;
    color: #333;
    line-height: 1.7;
    min-height: 100vh;
}

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

/* === ヘッダー === */
.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 24px 0;
    text-align: center;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.logo-icon {
    font-size: 2rem;
}

.header-tagline {
    margin-top: 6px;
    font-size: 0.95rem;
    opacity: 0.9;
}

/* === 広告スペース === */
.ad-space {
    text-align: center;
    padding: 10px 0;
}

.ad-placeholder {
    background: #e8ecf1;
    border: 2px dashed #ccc;
    border-radius: 8px;
    padding: 20px;
    color: #999;
    font-size: 0.85rem;
    max-width: 728px;
    margin: 0 auto;
}

.ad-middle {
    margin: 30px 0;
}

/* === メインコンテンツ === */
.main-content {
    padding: 30px 20px;
}

/* === モード選択タブ === */
.mode-section {
    margin-bottom: 20px;
}

.mode-tabs {
    display: flex;
    gap: 0;
    background: #e8ecf1;
    border-radius: 12px;
    padding: 4px;
    max-width: 500px;
    margin: 0 auto;
}

.mode-tab {
    flex: 1;
    padding: 12px 20px;
    border: none;
    background: transparent;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 500;
    color: #666;
    cursor: pointer;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.mode-tab.active {
    background: #fff;
    color: #667eea;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    font-weight: 700;
}

.mode-tab:hover:not(.active) {
    color: #333;
}

/* === 特徴バナー === */
.feature-banner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    padding: 18px 24px;
    margin-bottom: 16px;
    color: #fff;
    flex-wrap: wrap;
}

.feature-number {
    font-size: 2.2rem;
    font-weight: 900;
    line-height: 1;
}

.feature-text {
    font-size: 1.15rem;
    font-weight: 500;
}

.feature-text strong {
    color: #ffd54f;
}

/* === プライバシーバッジ === */
.privacy-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #e8f5e9;
    border: 1px solid #c8e6c9;
    border-radius: 8px;
    padding: 10px 16px;
    margin-bottom: 24px;
    font-size: 0.88rem;
    color: #2e7d32;
}

.privacy-icon {
    font-size: 1.1rem;
}

/* === ドロップエリア === */
.drop-area {
    border: 3px dashed #ccc;
    border-radius: 16px;
    padding: 50px 30px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    background: #fff;
}

.drop-area:hover,
.drop-area.drag-over {
    border-color: #667eea;
    background: #f0f3ff;
}

.drop-area.drag-over {
    transform: scale(1.01);
}

.drop-icon {
    font-size: 4rem;
    margin-bottom: 16px;
}

.drop-text {
    font-size: 1.2rem;
    font-weight: 500;
    color: #333;
    margin-bottom: 8px;
}

.drop-sub {
    color: #999;
    margin-bottom: 12px;
    font-size: 0.9rem;
}

.file-select-btn {
    display: inline-block;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 12px 32px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.file-select-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.drop-hint {
    margin-top: 14px;
    font-size: 0.82rem;
    color: #aaa;
}

/* === ドロップエリア 変換中状態 === */
.drop-area.processing {
    border-color: #667eea;
    background: #f0f3ff;
    padding: 30px;
}

.drop-processing {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.drop-processing-text {
    font-size: 1.1rem;
    font-weight: 500;
    color: #667eea;
}

/* === ドロップエリア 完了状態 === */
.drop-area.done {
    border-color: #4caf50;
    border-style: solid;
    background: #e8f5e9;
    padding: 30px;
}

.drop-done {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.drop-done-icon {
    font-size: 3rem;
    color: #4caf50;
    line-height: 1;
}

.drop-done-text {
    font-size: 1.2rem;
    font-weight: 700;
    color: #2e7d32;
}

.drop-done-sub {
    font-size: 0.85rem;
    color: #666;
    margin-top: 4px;
}

/* === 設定セクション === */
.settings-section {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    margin-top: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.section-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 16px;
    color: #333;
}

.settings-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
}

.setting-item {
    flex: 1;
    min-width: 250px;
}

.setting-label {
    font-size: 0.95rem;
    font-weight: 500;
    margin-bottom: 8px;
    display: block;
}

.quality-slider {
    width: 100%;
    height: 6px;
    -webkit-appearance: none;
    appearance: none;
    background: #e0e0e0;
    border-radius: 3px;
    outline: none;
}

.quality-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.quality-slider::-moz-range-thumb {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.quality-hints {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: #999;
    margin-top: 4px;
}

.format-options {
    display: flex;
    gap: 16px;
}

.format-option {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

.format-label {
    font-weight: 500;
}

/* === 結果セクション === */
.results-section {
    margin-top: 24px;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 12px;
}

.download-all-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    padding: 10px 24px;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.download-all-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.results-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.result-card {
    background: #fff;
    border-radius: 12px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: transform 0.2s;
}

.result-card:hover {
    transform: translateY(-1px);
}

.result-preview {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    object-fit: cover;
    background: #f5f5f5;
    flex-shrink: 0;
}

.result-info {
    flex: 1;
    min-width: 0;
}

.result-name {
    font-weight: 500;
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.result-sizes {
    font-size: 0.85rem;
    color: #666;
    margin-top: 4px;
}

.result-saving {
    display: inline-block;
    margin-top: 4px;
    font-size: 0.82rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 4px;
}

.result-saving.good {
    background: #e8f5e9;
    color: #2e7d32;
}

.result-saving.neutral {
    background: #fff3e0;
    color: #e65100;
}

.result-saving.bad {
    background: #fce4ec;
    color: #c62828;
}

.result-download-btn {
    background: #f0f3ff;
    color: #667eea;
    border: 2px solid #667eea;
    padding: 8px 20px;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
}

.result-download-btn:hover {
    background: #667eea;
    color: #fff;
}

/* === 変換中のスピナー === */
.converting-indicator {
    text-align: center;
    padding: 30px;
    color: #667eea;
    font-weight: 500;
}

.spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid #e0e0e0;
    border-top-color: #667eea;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-bottom: 12px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* === 説明セクション（SEO） === */
.info-section {
    margin-top: 40px;
}

.info-title {
    font-size: 1.3rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 24px;
    color: #333;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 40px;
}

.info-card {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.info-card-icon {
    font-size: 2.5rem;
    margin-bottom: 12px;
}

.info-card h3 {
    font-size: 1rem;
    margin-bottom: 8px;
    color: #333;
}

.info-card p {
    font-size: 0.85rem;
    color: #666;
    line-height: 1.6;
}

/* === FAQ === */
.faq-section {
    margin-top: 40px;
}

.faq-item {
    background: #fff;
    border-radius: 10px;
    margin-bottom: 10px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.faq-item summary {
    padding: 16px 20px;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.95rem;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faq-item summary::after {
    content: '+';
    font-size: 1.3rem;
    font-weight: 300;
    color: #667eea;
    transition: transform 0.3s;
}

.faq-item[open] summary::after {
    transform: rotate(45deg);
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item p {
    padding: 0 20px 16px;
    font-size: 0.9rem;
    color: #555;
    line-height: 1.7;
}

/* === フッター === */
.footer {
    background: #333;
    color: #aaa;
    text-align: center;
    padding: 24px 20px;
    margin-top: 50px;
    font-size: 0.85rem;
}

.footer-disclaimer {
    margin-top: 8px;
    font-size: 0.75rem;
    color: #777;
}

/* === 下層ページ共通 === */
.logo-link {
    text-decoration: none;
    color: inherit;
}

.page-content {
    padding: 40px 20px;
}

.page-title {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.page-date {
    font-size: 0.85rem;
    color: #888;
    margin-bottom: 30px;
}

.page-body {
    background: #fff;
    border-radius: 12px;
    padding: 32px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    line-height: 1.8;
}

.page-body h3 {
    font-size: 1.1rem;
    margin: 28px 0 12px;
    padding-bottom: 6px;
    border-bottom: 2px solid #667eea;
    color: #333;
}

.page-body h3:first-child {
    margin-top: 0;
}

.page-body p {
    margin-bottom: 12px;
    font-size: 0.95rem;
    color: #444;
}

.page-body ul {
    margin: 8px 0 16px 20px;
    font-size: 0.95rem;
    color: #444;
}

.page-body li {
    margin-bottom: 8px;
}

.page-body a {
    color: #667eea;
}

.footer-nav {
    margin-top: 10px;
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.footer-nav a {
    color: #aaa;
    text-decoration: none;
    font-size: 0.82rem;
}

.footer-nav a:hover {
    color: #fff;
}

/* === お問い合わせフォーム === */
.contact-form {
    margin-top: 24px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 6px;
    font-size: 0.95rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.95rem;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
}

.submit-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    padding: 14px 40px;
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.submit-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

/* === ブログ記事ページ === */
.blog-hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 30px 20px;
    text-align: center;
}

.blog-hero h2 {
    font-size: 1.5rem;
    max-width: 700px;
    margin: 0 auto;
}

.blog-meta {
    margin-top: 8px;
    font-size: 0.85rem;
    opacity: 0.85;
}

.blog-cta {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    color: #fff;
    margin: 30px 0;
}

.blog-cta h3 {
    border: none !important;
    color: #fff !important;
    margin: 0 0 8px !important;
}

.blog-cta p {
    color: rgba(255,255,255,0.9) !important;
    margin-bottom: 16px !important;
}

.blog-cta-btn {
    display: inline-block;
    background: #fff;
    color: #667eea;
    padding: 12px 32px;
    border-radius: 8px;
    font-weight: 700;
    text-decoration: none;
    transition: transform 0.2s;
}

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

/* === レスポンシブ === */
@media (max-width: 600px) {
    .logo {
        font-size: 1.4rem;
    }

    .drop-area {
        padding: 30px 16px;
    }

    .drop-icon {
        font-size: 3rem;
    }

    .drop-text {
        font-size: 1rem;
    }

    .result-card {
        flex-direction: column;
        text-align: center;
    }

    .result-preview {
        width: 100%;
        height: 120px;
        object-fit: contain;
    }

    .results-header {
        flex-direction: column;
        text-align: center;
    }

    .mode-tabs {
        flex-direction: column;
    }

    .settings-grid {
        flex-direction: column;
    }
}
