/* 基本スタイル */
.subtitle {
    text-align: center;
    color: #64748b;
    font-size: 1.2rem;
    margin-bottom: 3rem;
}

/* 変換タイプ選択 */
.conversion-type {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.type-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.type-btn {
    padding: 1rem 2rem;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    background: #f8fafc;
    color: #64748b;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
    min-width: 200px;
}

.type-btn:hover {
    border-color: #3b82f6;
    color: #3b82f6;
    transform: translateY(-2px);
}

.type-btn.active {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    border-color: #3b82f6;
    color: white;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

/* 入力・結果エリア */
.input-section,
.result-section {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.textarea-container {
    position: relative;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
    transition: border-color 0.3s;
}

.textarea-container:focus-within {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.input-textarea,
.result-textarea {
    width: 100%;
    min-height: 120px;
    padding: 1rem;
    border: none;
    font-size: 1rem;
    line-height: 1.6;
    resize: vertical;
    font-family: inherit;
    background: transparent;
}

.input-textarea:focus,
.result-textarea:focus {
    outline: none;
}

.result-textarea {
    background: #f8fafc;
    color: #374151;
}

.textarea-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: #f8fafc;
    border-top: 1px solid #e5e7eb;
}

.char-count {
    font-size: 0.9rem;
    color: #6b7280;
    font-weight: 500;
}

.clear-btn,
.copy-btn {
    padding: 0.5rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: white;
    color: #374151;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.clear-btn:hover {
    background: #f3f4f6;
    border-color: #9ca3af;
}

.copy-btn:hover {
    background: #eff6ff;
    border-color: #3b82f6;
    color: #3b82f6;
}

.copy-btn.copied {
    background: #dcfce7;
    border-color: #16a34a;
    color: #16a34a;
}

.copy-icon {
    width: 16px;
    height: 16px;
}

/* 変換例 */
.examples-section {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

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

.example-card {
    padding: 1.5rem;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.example-card h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 1rem;
    text-align: center;
}

.example-item {
    display: flex;
    flex-direction: row;
    gap: 0.5rem;
    margin-bottom: 1rem;
    padding: 1rem;
    background: white;
    border-radius: 6px;
    font-size: 0.95rem;
}

.example-input {
    color: #4b5563;
    font-weight: 500;
}

.example-arrow {
    color: #3b82f6;
    font-weight: bold;
    text-align: center;
}

.example-output {
    color: #059669;
    font-weight: 500;
}

/* 説明セクション */
.action-section {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .type-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .type-btn {
        width: 100%;
        max-width: 300px;
    }
    
    .textarea-footer {
        flex-direction: column;
        gap: 0.75rem;
        align-items: stretch;
    }
    
    .char-count {
        text-align: center;
    }
    
    .examples-grid {
        grid-template-columns: 1fr;
    }
    
    .example-item {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .input-section,
    .result-section,
    .examples-section,
    .conversion-type,
    .action-section {
        padding: 1.5rem;
    }
    
    .input-textarea,
    .result-textarea {
        min-height: 100px;
        font-size: 0.95rem;
    }
    
    .example-card {
        padding: 1rem;
    }
}