/* リセットCSS */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

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

/* ヘッダー */
header {
    text-align: center;
    margin-bottom: 40px;
    padding: 20px;
    background: #4a5568;
    color: white;
    border-radius: 10px;
}

header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
}

header p {
    font-size: 1.2em;
    opacity: 0.9;
}

/* メインコンテンツ */
.content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 40px;
}

/* フォームセクション */
.form-section {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.form-section h2 {
    margin-bottom: 20px;
    color: #333;
    font-size: 1.8em;
}

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

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #555;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

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

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.file-info {
    margin-top: 5px;
}

.file-info small {
    color: #666;
    font-size: 0.9em;
}

/* プレビューセクション */
.preview-section {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.preview-section h2 {
    margin-bottom: 20px;
    color: #333;
    font-size: 1.8em;
}

.thumbnail-container {
    border: 2px solid #ddd;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 20px;
    background: #f9f9f9;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 300px;
}

#thumbnailCanvas {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

.preview-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}

/* ボタンスタイル */
.btn-primary,
.btn-secondary,
.btn-outline {
    padding: 12px 24px;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background: #4a5568;
    color: white;
    width: 100%;
}

.btn-primary:hover {
    background: #2d3748;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(74, 85, 104, 0.4);
}

.btn-secondary {
    background: #28a745;
    color: white;
}

.btn-secondary:hover {
    background: #218838;
    transform: translateY(-2px);
}

.btn-secondary:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.btn-outline {
    background: transparent;
    color: #4a5568;
    border: 2px solid #4a5568;
}

.btn-outline:hover {
    background: #4a5568;
    color: white;
}

/* フッター */
footer {
    text-align: center;
    padding: 20px;
    color: #666;
    border-top: 1px solid #ddd;
    margin-top: 40px;
}

/* レスポンシブデザイン */
@media (max-width: 768px) {
    .content {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .form-section,
    .preview-section {
        padding: 20px;
    }
    
    header h1 {
        font-size: 2em;
    }
    
    header p {
        font-size: 1em;
    }
    
    .preview-actions {
        flex-direction: column;
    }
    
    .btn-primary,
    .btn-secondary,
    .btn-outline {
        width: 100%;
    }
}

/* アニメーション */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-section,
.preview-section {
    animation: fadeIn 0.6s ease-out;
}

/* 通知スタイル */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #4a5568;
    color: white;
    padding: 15px 20px;
    border-radius: 5px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    z-index: 1000;
    font-size: 14px;
    max-width: 300px;
    transform: translateX(100%);
    opacity: 0;
    transition: all 0.3s ease;
}

.notification.show {
    transform: translateX(0);
    opacity: 1;
}

.notification.success {
    background: #28a745;
}

.notification.info {
    background: #17a2b8;
}

/* 開発者リンク */
.developer-link {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
}

.developer-link a {
    display: inline-block;
    padding: 8px 12px;
    background: rgba(74, 85, 104, 0.9);
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-size: 12px;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.developer-link a:hover {
    background: rgba(74, 85, 104, 1);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(74, 85, 104, 0.4);
}

@media (max-width: 768px) {
    .developer-link {
        bottom: 10px;
        right: 10px;
    }
    
    .developer-link a {
        font-size: 11px;
        padding: 6px 10px;
    }
}

/* ヘルプボタン */
.help-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 15px;
}

.help-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-1px);
}

/* モーダル */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: #fefefe;
    margin: 2% auto;
    border-radius: 10px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    background: linear-gradient(135deg, #4a5568 0%, #2d3748 100%);
    color: white;
    padding: 20px;
    border-radius: 10px 10px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.5em;
}

.close-btn {
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.close-btn:hover {
    opacity: 1;
}

.modal-body {
    padding: 30px;
    line-height: 1.6;
}

.modal-footer {
    background: #f8f9fa;
    padding: 15px 30px;
    border-radius: 0 0 10px 10px;
    text-align: center;
    color: #666;
    font-style: italic;
}

.manual-section {
    margin-bottom: 30px;
}

.manual-section h3 {
    color: #4a5568;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.manual-section h4 {
    color: #2d3748;
    margin-bottom: 8px;
}

.manual-section ol,
.manual-section ul {
    margin-left: 20px;
}

.manual-section li {
    margin-bottom: 8px;
}

.feature-grid,
.example-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 15px;
}

.feature-item,
.example-item {
    background: #f7fafc;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #4a5568;
}

.feature-item h4,
.example-item h4 {
    margin-top: 0;
    margin-bottom: 8px;
    color: #2d3748;
}

.feature-item p,
.example-item p {
    margin: 0;
    color: #4a5568;
    font-size: 14px;
}

code {
    background: #e2e8f0;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 13px;
}

/* モバイル対応 */
@media (max-width: 768px) {
    .modal-content {
        margin: 5% auto;
        width: 95%;
    }
    
    .modal-header {
        padding: 15px;
    }
    
    .modal-header h2 {
        font-size: 1.2em;
    }
    
    .modal-body {
        padding: 20px;
    }
    
    .feature-grid,
    .example-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .help-btn {
        font-size: 12px;
        padding: 6px 12px;
    }
}

