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

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

.container {
    max-width: 800px;
    margin: 0 auto;
    background-color: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

h1 {
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: 28px;
}

.description {
    color: #666;
    margin-bottom: 20px;
}

.info-box {
    background-color: #e3f2fd;
    border: 1px solid #2196F3;
    border-radius: 5px;
    padding: 15px;
    margin-bottom: 25px;
}

.info-box p {
    margin: 0 0 10px 0;
    font-weight: bold;
    color: #1976D2;
}

.info-box ul {
    margin: 0;
    padding-left: 20px;
}

.info-box li {
    color: #555;
    margin-bottom: 5px;
}

.info-box a {
    color: #1976D2;
    text-decoration: underline;
}

.input-section {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

#urlInput {
    flex: 1;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
    transition: border-color 0.3s;
}

#urlInput:focus {
    outline: none;
    border-color: #4CAF50;
}

#fetchButton {
    padding: 12px 30px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s;
}

#fetchButton:hover {
    background-color: #45a049;
}

.loading {
    text-align: center;
    color: #666;
    padding: 20px;
    font-size: 18px;
}

.error {
    background-color: #fee;
    color: #c33;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
}

.hidden {
    display: none;
}

.preview-section {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 2px solid #eee;
}

.preview-section h2 {
    color: #2c3e50;
    margin-bottom: 20px;
}

.preview-content {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 30px;
    align-items: start;
}

.preview-image {
    text-align: center;
}

.preview-image img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 15px;
}

.download-btn {
    width: 100%;
    padding: 10px;
    background-color: #2196F3;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.download-btn:hover {
    background-color: #1976D2;
}

.preview-info h3 {
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: 20px;
}

.preview-info p {
    color: #666;
    margin-bottom: 15px;
}

#additionalInfo p {
    margin-bottom: 8px;
    font-size: 14px;
}

#additionalInfo strong {
    color: #555;
}

#additionalInfo a {
    color: #2196F3;
    text-decoration: none;
    word-break: break-all;
}

#additionalInfo a:hover {
    text-decoration: underline;
}

.raw-data-section {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 2px solid #eee;
}

.raw-data-section h3 {
    color: #2c3e50;
    margin-bottom: 15px;
}

#rawData {
    background-color: #f8f8f8;
    padding: 15px;
    border-radius: 5px;
    overflow-x: auto;
    font-family: 'Courier New', Courier, monospace;
    font-size: 13px;
    line-height: 1.4;
    color: #555;
}

/* 手動入力セクション */
.manual-input-section {
    background-color: #fef8e7;
    border: 2px solid #fdb82d;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
}

.manual-input-section h3 {
    color: #f39c12;
    margin-bottom: 15px;
}

.manual-input-section ol {
    margin: 15px 0 20px 20px;
    color: #666;
}

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

.manual-input-fields {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 20px;
}

.manual-input,
.manual-textarea {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    font-family: inherit;
}

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

.manual-submit-btn {
    padding: 12px 20px;
    background-color: #f39c12;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.manual-submit-btn:hover {
    background-color: #e67e22;
}

/* レスポンシブデザイン */
@media (max-width: 768px) {
    .container {
        padding: 20px;
    }

    h1 {
        font-size: 24px;
    }

    .input-section {
        flex-direction: column;
    }

    #fetchButton {
        width: 100%;
    }

    .preview-content {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .preview-image {
        order: -1;
    }

    .manual-input-section {
        padding: 15px;
    }
}