/* グローバルスタイル */
:root {
    --primary-color: #2563eb;
    --secondary-color: #1e40af;
    --error-color: #dc2626;
    --text-color: #1f2937;
    --border-color: #e5e7eb;
    --background-color: #f3f4f6;
    --box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

body {
    background: var(--background-color);
    font-family: 'Helvetica Neue', Arial, sans-serif;
}

/* ヘッダースタイル */
.header_menu {
    list-style-type: none;
    padding: 0;
    display: flex;
    align-items: center;
}

.header_menu li {
    margin-right: 20px;
}

.logo-link {
    text-decoration: none;
    color: inherit;
    transition: opacity 0.3s ease;
}

.logo-link:hover {
    opacity: 0.8;
}

/* メインコンテナスタイル */
.login-box {
    background: white;
    padding: 2.5rem;
    border-radius: 1rem;
    box-shadow: var(--box-shadow);
    max-width: 450px;
    margin: 3rem auto;
    position: relative;
    overflow: hidden;
}

.login-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
}

.section-heading {
    text-align: center;
    color: var(--text-color);
    margin-bottom: 2rem;
    font-size: 1.8rem;
    font-weight: 600;
}

/* フォームスタイル */
.login_container {
    width: 100%;
}

.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-color);
    font-size: 0.95rem;
}

input[type="text"],
input[type="password"] {
    width: calc(100% - 2rem); /* パディングを考慮した幅に修正 */
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 0.5rem;
    font-size: 1rem;
    transition: all 0.3s ease;
    background-color: #fff;
    box-sizing: border-box; /* ボックスサイズの計算方法を変更 */
}

input[type="text"]:focus,
input[type="password"]:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* ボタンスタイル */
button[type="submit"] {
    width: 100%;
    padding: 0.875rem;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    margin-top: 1rem;
}

button[type="submit"]:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}

button[type="submit"]:active {
    transform: translateY(0);
}

/* エラーメッセージスタイル */
.error {
    color: var(--error-color);
    font-size: 0.875rem;
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.error::before {
    content: '!';
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    background-color: var(--error-color);
    color: white;
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: bold;
}

/* 新規登録リンクスタイル */
.register-link {
    text-align: center;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.register-link p {
    color: #6b7280;
    font-size: 0.95rem;
    line-height: 1.6;
}

.register-link a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.register-link a:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

/* レスポンシブデザイン */
@media (max-width: 640px) {
    .login-box {
        margin: 1rem;
        padding: 1.5rem;
    }

    .section-heading {
        font-size: 1.5rem;
    }
}

/* アニメーション */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-box {
    animation: fadeIn 0.5s ease-out;
}