.text-master-container {
    max-width: 900px;
    margin: 2rem auto;
    padding: 2.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}

.text-master-inner {
    background: #ffffff;
    padding: 2rem;
    border-radius: 16px;
}

.text-master-header {
    text-align: center;
    margin-bottom: 2rem;
}

.text-master-header h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 0.5rem 0;
}

.text-master-header p {
    font-size: 0.9375rem;
    color: #64748b;
    margin: 0;
}

.text-master-container .center-container {
    margin-bottom: 1.75rem;
}

.text-master-container .option-label {
    display: block;
    font-size: 1.0625rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.text-master-container .option-label::before {
    content: "●";
    color: #667eea;
    font-size: 1.25rem;
}

.text-master-container .field-description {
    display: block;
    font-size: 0.875rem;
    color: #64748b;
    margin-bottom: 0.75rem;
    padding-left: 1.5rem;
}

.text-master-container textarea.custom-input {
    width: 100%;
    min-height: 150px;
    padding: 1.25rem;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    background-color: #f8fafc;
    font-size: 1rem;
    line-height: 1.6;
    transition: all 0.3s ease;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    resize: vertical;
}

.text-master-container textarea.custom-input:focus {
    border-color: #667eea;
    background-color: #ffffff;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.15);
    outline: none;
}

.text-master-container select.custom-input {
    width: 100%;
    padding: 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    background-color: #f8fafc;
    font-size: 1rem;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='14' height='9' viewBox='0 0 14 9' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L7 7L13 1' stroke='%23667eea' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1.25rem center;
    padding-right: 3rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.text-master-container select.custom-input:focus {
    border-color: #667eea;
    background-color: #ffffff;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.15);
    outline: none;
}

.text-master-button {
    width: 100%;
    padding: 1.25rem 2rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    border: none;
    border-radius: 12px;
    font-size: 1.0625rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.text-master-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

.text-master-button:active {
    transform: translateY(0);
}

#tm-outputContainer {
    margin-top: 3rem;
}

#tm-outputContainer.has-content {
    padding: 2rem;
    border-radius: 16px;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}

.output-header {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.output-header h3 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
}

.output-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.output-actions button {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-download-all {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

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

.btn-clear {
    background: #f1f5f9;
    color: #475569;
}

.btn-clear:hover {
    background: #e2e8f0;
}

.section-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.25rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.section-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #f1f5f9;
}

.section-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-title .section-number {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 6px;
    font-size: 0.875rem;
}

.section-info {
    font-size: 0.875rem;
    color: #64748b;
}

.section-content {
    margin-bottom: 1rem;
}

.section-content textarea {
    width: 100%;
    min-height: 120px;
    padding: 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    background-color: #f8fafc;
    font-size: 0.9375rem;
    line-height: 1.6;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    resize: vertical;
}

.section-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.section-actions button {
    padding: 0.625rem 1.25rem;
    border: none;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-copy {
    background: #667eea;
    color: white;
}

.btn-copy:hover {
    background: #5568d3;
}

.btn-copy.copied {
    background: #10b981;
}

.btn-download {
    background: #f1f5f9;
    color: #475569;
}

.btn-download:hover {
    background: #e2e8f0;
}

.char-count {
    font-size: 0.75rem;
    color: #94a3b8;
    margin-top: 0.5rem;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .text-master-container {
        margin: 1rem;
        padding: 1.5rem;
    }

    .text-master-inner {
        padding: 1.5rem;
    }

    .text-master-header h2 {
        font-size: 1.5rem;
    }

    .output-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .output-actions,
    .section-actions {
        width: 100%;
    }

    .output-actions button,
    .section-actions button {
        flex: 1;
        justify-content: center;
    }
}
