/* 日本語対応のカスタムアニメーション */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.animate-pulse {
    animation: pulse 2s infinite;
}

/* 日本語フォント設定 */
body {
    font-family: 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', 'Yu Gothic Medium', 'Meiryo', 'MS Gothic', sans-serif;
}

/* ドラッグエリアスタイル */
#dropZone.dragover {
    background-color: rgba(125, 211, 252, 0.1);
    border-color: #7dd3fc;
}

/* 結果カードスタイル */
.result-card {
    transition: all 0.3s ease;
    font-family: 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', 'Yu Gothic Medium', 'Meiryo', sans-serif;
}

.result-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

/* プログレスバースタイル */
.progress-bar {
    height: 4px;
    background: linear-gradient(to right, #7dd3fc, #0284c7);
    transition: width 0.3s ease;
}

/* タグスタイル */
.tag {
    background: linear-gradient(45deg, #7dd3fc, #0284c7);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    display: inline-block;
    margin: 0.25rem;
}

/* ボタンホバー効果 */
.btn-hover-effect:hover {
    box-shadow: 0 0 15px rgba(125, 211, 252, 0.5);
}

/* 日本語対応スクロールバースタイル */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f8fafc;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, #7dd3fc, #0284c7);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(to bottom, #38bdf8, #0369a1);
}

/* 日本語テキスト行間調整 */
.japanese-text {
    line-height: 1.7;
    letter-spacing: 0.02em;
}

/* 日本語見出しスタイル */
.japanese-heading {
    font-weight: 600;
    letter-spacing: 0.05em;
}

/* 日本語入力フィールドスタイル */
.japanese-input {
    font-family: 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', 'Yu Gothic Medium', 'Meiryo', sans-serif;
    line-height: 1.6;
}

/* カード内の日本語テキスト調整 */
.card .japanese-text {
    font-size: 0.9rem;
    line-height: 1.8;
}

/* 履歴書分析結果の特別スタイル */
.analysis-result {
    background: rgba(248, 250, 252, 0.8);
    border-left: 4px solid #7dd3fc;
    padding: 1rem;
    margin: 0.5rem 0;
    border-radius: 0 8px 8px 0;
}

.analysis-result h4 {
    color: #0f172a;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.analysis-result ul {
    margin: 0;
    padding-left: 1.2rem;
}

.analysis-result li {
    margin-bottom: 0.4rem;
    line-height: 1.7;
}

/* 候補者情報カードスタイル */
.candidate-info-card {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    padding: 1.5rem;
}

.candidate-info-item {
    display: flex;
    align-items: center;
    margin-bottom: 0.75rem;
    padding: 0.5rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.candidate-info-label {
    font-weight: 600;
    color: #475569;
    min-width: 80px;
    margin-right: 0.75rem;
}

.candidate-info-value {
    color: #1e293b;
    flex: 1;
}

/* 分析ステータス表示 */
.analysis-status {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 12px;
    margin: 1rem 0;
}

.analysis-status .spinner {
    width: 32px;
    height: 32px;
    border: 3px solid #e2e8f0;
    border-top: 3px solid #7dd3fc;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 1rem;
}

/* 日本語フォームバリデーション */
.form-error {
    color: #dc2626;
    font-size: 0.875rem;
    margin-top: 0.25rem;
    font-weight: 500;
}

.form-success {
    color: #059669;
    font-size: 0.875rem;
    margin-top: 0.25rem;
    font-weight: 500;
}

/* アップロードエリアの日本語対応 */
.upload-area-japanese {
    text-align: center;
    padding: 2rem;
    border: 2px dashed #7dd3fc;
    border-radius: 12px;
    background: rgba(125, 211, 252, 0.05);
    transition: all 0.3s ease;
}

.upload-area-japanese:hover {
    background: rgba(125, 211, 252, 0.1);
    border-color: #0284c7;
}

.upload-area-japanese .icon {
    font-size: 3rem;
    color: #7dd3fc;
    margin-bottom: 1rem;
}

.upload-area-japanese .primary-text {
    font-size: 1.1rem;
    color: #374151;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.upload-area-japanese .secondary-text {
    font-size: 0.875rem;
    color: #6b7280;
    line-height: 1.5;
}

/* ファイルリストの日本語対応 */
.file-list-japanese {
    max-height: 300px;
    overflow-y: auto;
    margin-top: 1rem;
}

.file-item-japanese {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.file-item-japanese:hover {
    background: #f9fafb;
    border-color: #7dd3fc;
}

.file-info {
    display: flex;
    align-items: center;
    flex: 1;
}

.file-icon {
    font-size: 1.5rem;
    margin-right: 0.75rem;
    color: #dc2626;
}

.file-details {
    flex: 1;
}

.file-name {
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.25rem;
}

.file-size {
    font-size: 0.75rem;
    color: #6b7280;
}

.file-remove {
    padding: 0.5rem;
    color: #dc2626;
    background: none;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
}

.file-remove:hover {
    background: #fef2f2;
    color: #b91c1c;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .candidate-info-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .candidate-info-label {
        min-width: auto;
        margin-right: 0;
        margin-bottom: 0.25rem;
    }
    
    .japanese-text {
        font-size: 0.875rem;
    }
}

/* テンプレート選択エリアのスタイル */
.template-section {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border: 1px solid #7dd3fc;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.template-select {
    transition: all 0.3s ease;
    background: white;
    border: 2px solid #e2e8f0;
}

.template-select:focus {
    border-color: #7dd3fc;
    box-shadow: 0 0 0 3px rgba(125, 211, 252, 0.1);
}

.template-buttons {
    display: flex;
    gap: 0.75rem;
}

.template-btn {
    transition: all 0.3s ease;
    font-weight: 500;
    border-radius: 6px;
    padding: 0.3rem 0.6rem;
    font-size: 0.8rem;
    line-height: 1.2;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    outline: none;
    border: none;
    min-height: 30px;
    flex-shrink: 0;
}

/* 响应式调整：超小屏幕上的按钮优化 */
@media (max-width: 480px) {
    .template-btn {
        padding: 0.25rem 0.45rem;
        font-size: 0.75rem;
        min-height: 26px;
    }
    
    .template-btn i {
        font-size: 0.7rem;
    }
}

/* 响应式调整：在大屏幕上使用更大的按钮 */
@media (min-width: 768px) {
    .template-btn {
        padding: 0.45rem 0.85rem;
        font-size: 0.9rem;
        min-height: 34px;
    }
}

.template-btn:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.3);
}


.template-btn-reset {
    background: #f8fafc;
    color: #64748b;
    border: 1px solid #e2e8f0;
}

.template-btn-reset:hover {
    background: #e2e8f0;
    color: #475569;
}

/* 通知スタイルの改善 */
.notification {
    font-family: 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', 'Yu Gothic Medium', 'Meiryo', sans-serif;
    border-radius: 8px;
    backdrop-filter: blur(10px);
}

.notification-success {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.9) 0%, rgba(22, 163, 74, 0.9) 100%);
}

.notification-error {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.9) 0%, rgba(220, 38, 38, 0.9) 100%);
}

.notification-info {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.9) 0%, rgba(37, 99, 235, 0.9) 100%);
}

/* フォーム要素の日本語対応改善 */
.japanese-form-field {
    font-family: 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', 'Yu Gothic Medium', 'Meiryo', sans-serif;
    line-height: 1.6;
    letter-spacing: 0.02em;
}

.japanese-form-field::placeholder {
    color: #9ca3af;
    font-size: 0.875rem;
}

/* ダークモード対応（必要に応じて） */
@media (prefers-color-scheme: dark) {
    .result-card {
        background: #1f2937;
        color: #f9fafb;
    }
    
    .candidate-info-card {
        background: #374151;
        border-color: #4b5563;
    }
    
    .candidate-info-item {
        background: #1f2937;
        border-color: #374151;
    }

    .template-section {
        background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
        border-color: #475569;
    }

    .template-select {
        background: #1f2937;
        color: #f9fafb;
        border-color: #4b5563;
    }
}

/* 翻译提示样式 */
.translation-notice {
    animation: slideInDown 0.5s ease-out;
    border-left: 4px solid #3b82f6;
}

.translation-notice i {
    animation: pulse 2s infinite;
}

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

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

/* 多语言支持提示 */
.language-support-info {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    border: 1px solid #93c5fd;
    color: #1e40af;
    font-size: 0.875rem;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.language-support-info .language-icon {
    color: #3b82f6;
    margin-right: 0.5rem;
}

/* 排序选择框样式 */
#sortSelect {
    background: white;
    border: 1px solid #d1d5db;
    transition: all 0.3s ease;
    cursor: pointer;
}

#sortSelect:hover {
    border-color: #7dd3fc;
    box-shadow: 0 1px 3px rgba(125, 211, 252, 0.1);
}

#sortSelect:focus {
    border-color: #7dd3fc;
    box-shadow: 0 0 0 3px rgba(125, 211, 252, 0.1);
    outline: none;
}

/* 结果卡片排序动画 */
.result-card {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.result-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

/* 错误卡片样式 */
.error-card {
    animation: shakeX 0.5s ease-in-out;
}

@keyframes shakeX {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* 模板管理按钮样式 */
.template-btn-create {
    background-color: #10b981;
    color: white;
}

.template-btn-create:hover {
    background-color: #059669;
    color: white;
}

.template-btn-edit {
    background-color: #3b82f6;
    color: white;
}

.template-btn-edit:hover {
    background-color: #2563eb;
    color: white;
}

.template-btn-edit:disabled {
    background-color: #9ca3af;
    color: white;
    cursor: not-allowed;
    transform: none;
}

/* 模板弹窗样式 */
#templateModal .weight-input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

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

#templateModal input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* 全局按钮样式 - 移除点击时的黑色边框 */
button, .btn, .btn-primary, .btn-secondary, input[type="button"], input[type="submit"] {
    outline: none !important;
    border-style: solid;
}

button:focus, .btn:focus, .btn-primary:focus, .btn-secondary:focus, 
input[type="button"]:focus, input[type="submit"]:focus {
    outline: none !important;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.3) !important;
}

/* 点击时也不显示outline */
button:active, .btn:active, .btn-primary:active, .btn-secondary:active,
input[type="button"]:active, input[type="submit"]:active {
    outline: none !important;
} 