:root {
    --primary-color: #4f46e5;
    --primary-hover: #4338ca;
    --secondary-color: #f0f4f8;
    --accent-color: #7c3aed;
    --text-color: #1f2937;
    --text-light: #6b7280;
    --border-color: #e5e7eb;
    --success-color: #10b981;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
}

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

body {
    font-family: 'Inter', 'Noto Sans JP', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.6;
    padding: 2rem;
    max-width: 800px;
    margin: 0 auto;
    color: var(--text-color);
    background-color: #fafafa;
}

h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
    text-align: center;
}

h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--text-color);
}

textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
    resize: vertical;
    min-height: 100px;
    font-family: inherit;
    background-color: white;
}

textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.2);
}

button {
    padding: 0.75rem 1.5rem;
    cursor: pointer;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 500;
    transition: background-color 0.2s, transform 0.1s;
    box-shadow: var(--shadow-sm);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

button:hover {
    background-color: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

button:active {
    transform: translateY(0);
}

button:disabled {
    background-color: var(--text-light);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
    opacity: 0.7;
}

#resultOutput {
    margin-top: 1.5rem;
    padding: 1.5rem;
    border-radius: var(--radius-md);
    background-color: white;
    white-space: pre-wrap;
    min-height: 100px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    transition: box-shadow 0.3s;
}

#resultOutput:not(:empty) {
    animation: fadeIn 0.5s ease-out;
}

/* 設定パネルのスタイル */
.settings-panel {
    background-color: white;
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

.settings-section {
    margin-bottom: 1.25rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
}

.settings-section:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.settings-section label {
    font-weight: 500;
    margin-right: 1rem;
    min-width: 160px;
    color: var(--text-color);
}

.setting-description {
    font-size: 0.875rem;
    color: var(--text-light);
    margin-top: 0.5rem;
    width: 100%;
    margin-left: 160px;
}

#modelSelect {
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    font-size: 0.875rem;
    width: calc(100% - 180px);
    background-color: white;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%236b7280' viewBox='0 0 16 16'%3E%3Cpath d='M8 10.5a.5.5 0 0 1-.354-.146l-4-4a.5.5 0 1 1 .708-.708L8 9.293l3.646-3.647a.5.5 0 0 1 .708.708l-4 4A.5.5 0 0 1 8 10.5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    transition: border-color 0.2s, box-shadow 0.2s;
}

#modelSelect:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.2);
}

#temperatureInput {
    width: calc(100% - 230px);
    vertical-align: middle;
    margin: 0 0.75rem;
    accent-color: var(--primary-color);
}

#temperatureValue {
    display: inline-block;
    width: 30px;
    text-align: center;
    font-weight: 500;
    color: var(--primary-color);
}

#maxTokensInput {
    width: calc(100% - 180px);
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    font-size: 0.875rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

#maxTokensInput:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.2);
}

label[for="imageInput"] {
    display: block;
    margin-bottom: 0.5rem;
}

#imageInput {
    display: block;
    margin-bottom: 1.5rem;
}

/* カスタムファイル入力スタイル */
#imageInput::file-selector-button {
    font-size: 0.875rem;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    background-color: white;
    color: var(--text-color);
    cursor: pointer;
    margin-right: 0.75rem;
    transition: background-color 0.2s;
}

#imageInput::file-selector-button:hover {
    background-color: var(--secondary-color);
}

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

/* レスポンシブ対応 */
@media (max-width: 768px) {
    body {
        padding: 1rem;
    }
    
    .settings-section label {
        min-width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .setting-description,
    #modelSelect,
    #temperatureInput,
    #maxTokensInput {
        margin-left: 0;
        width: 100%;
    }
    
    #temperatureInput {
        margin: 0.5rem 0;
    }
}

.container {
    width: 100%;
    max-width: 800px;
}

.accent-text {
    color: var(--accent-color);
    font-weight: 700;
}

.material-symbols-rounded {
    vertical-align: middle;
    margin-right: 0.5rem;
    font-size: 1.25rem;
}

.input-section {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.input-field {
    display: flex;
    flex-direction: column;
}

/* ドラッグ＆ドロップエリアのスタイル */
.input-field.file-upload {
    position: relative;
}

.dropzone {
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-md);
    padding: 2rem 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
    background-color: var(--secondary-color);
    cursor: pointer;
    margin-top: 0.5rem;
}

.dropzone.dragover {
    border-color: var(--primary-color);
    background-color: rgba(79, 70, 229, 0.05);
}

.dropzone .upload-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.dropzone .upload-message {
    margin-bottom: 0.75rem;
    font-weight: 500;
}

.dropzone .upload-hint {
    font-size: 0.875rem;
    color: var(--text-light);
}

.dropzone input[type="file"] {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    opacity: 0;
    cursor: pointer;
}

.file-preview {
    display: flex;
    align-items: center;
    margin-top: 1rem;
    padding: 0.75rem;
    border-radius: var(--radius-md);
    background-color: white;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.file-preview img {
    max-width: 60px;
    max-height: 60px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    margin-right: 1rem;
}

.file-info {
    flex: 1;
}

.file-name {
    font-weight: 500;
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 250px;
}

.file-size {
    font-size: 0.75rem;
    color: var(--text-light);
}

.file-remove {
    color: var(--text-light);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 50%;
    transition: all 0.2s;
}

.file-remove:hover {
    color: #ef4444;
    background-color: rgba(239, 68, 68, 0.1);
}

.input-field label {
    display: flex;
    align-items: center;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.result-section h2 {
    display: flex;
    align-items: center;
    font-weight: 600;
    color: var(--text-color);
}

.result-box {
    position: relative;
}

.result-box:empty::after {
    content: "AIの応答がここに表示されます";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--text-light);
    font-style: italic;
}

footer {
    margin-top: 3rem;
    text-align: center;
    color: var(--text-light);
    font-size: 0.875rem;
    padding: 1rem 0;
    border-top: 1px solid var(--border-color);
}

button .material-symbols-rounded {
    margin-right: 0.5rem;
    font-size: 1.25rem;
}

/* より洗練されたホバーエフェクト */
.settings-panel:hover {
    box-shadow: var(--shadow-lg);
    transition: box-shadow 0.3s ease;
}

#generateButton {
    align-self: flex-start;
    margin-top: 0.5rem;
}

@media (max-width: 768px) {
    #generateButton {
        align-self: stretch;
        width: 100%;
    }
    
    /* ... existing code ... */
}
