/* 基本設定 */
:root {
    --primary-color: #c2639c;
    --primary-light: #d87fb3;
    --primary-dark: #a84d85;
    --secondary-color: #b566a8;
    --accent-color: #e891cc;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --info-color: #c2639c;
    --light-bg: #fdf8fc;
    --border-radius: 12px;
    --box-shadow: 0 4px 12px rgba(194, 99, 156, 0.15);
    --gradient-primary: linear-gradient(135deg, #c2639c 0%, #b566a8 100%);
    --gradient-light: linear-gradient(135deg, #f8f0f5 0%, #ede4ea 100%);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Noto Sans JP", "Noto Sans", sans-serif;
    margin: 0;
    padding: 0;
    background: var(--gradient-light);
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    height: 100px;
    /* border-bottom: 1px solid #e6d7e0; */
    box-sizing: border-box;
    /* background: white; */
    /* box-shadow: 0 2px 8px rgba(194, 99, 156, 0.1); */
}

.logo {
    height: 100px;
    font-size: 24px;
    font-weight: bold;
    transition: transform 0.3s ease;
}

.logo img {
    height: 120%;
    width: auto;
    margin-top: 20px;
}

.logo:hover {
    transform: scale(1.02);
}

.page-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.content-area {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: -100px;
}

/* ログインエリアのカードスタイル */
.auth-container {
    width: 500px;
    max-width: 95vw;
    padding: 0;
    margin: 0 0 80px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(194, 99, 156, 0.15);
    background: white;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
}

.auth-container:hover {
    box-shadow: 0 15px 40px rgba(194, 99, 156, 0.2);
}

/* ヘッダー部分 */
.auth-header {
    background: var(--gradient-primary);
    color: white;
    padding: 25px 30px;
    border-bottom: none;
}

.auth-title {
    font-size: 1.8rem;
    color: white;
    margin: 0;
    text-align: center;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.auth-subtitle {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.9);
    margin: 8px 0 0 0;
    text-align: center;
    line-height: 1.5;
    font-weight: 400;
}

/* コンテンツエリア */
.auth-content {
    padding: 30px;
}

/* ログインフォームセクション */
.login-form-section {
    margin-bottom: 20px;
}

.login-form-title {
    font-size: 1.5rem;
    color: #2c3e50;
    margin-bottom: 25px;
    text-align: center;
    font-weight: 600;
}

.input-group {
    margin-bottom: 20px;
    position: relative;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    color: #34495e;
    font-weight: 500;
    font-size: 14px;
}

.input-group input {
    width: 100%;
    padding: 15px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #fff;
}

.input-group input:hover {
    border-color: #bdc3c7;
}

.input-group input:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(194, 99, 156, 0.2);
}

.password-input-wrapper {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: #7f8c8d;
    font-size: 16px;
    padding: 5px;
    transition: color 0.3s ease;
}

.password-toggle:hover {
    color: #34495e;
}

.error-message {
    color: #e74c3c;
    font-size: 12px;
    margin-top: 5px;
    display: none;
}

.input-group.error .error-message {
    display: block;
}

.submit-btn {
    background: var(--primary-color);
    color: white;
    padding: 15px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    width: 100%;
    margin-top: 15px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.submit-btn:hover:not(:disabled) {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(194, 99, 156, 0.3);
}

.submit-btn:active:not(:disabled) {
    transform: translateY(1px);
    box-shadow: none;
}

.submit-btn:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
    transform: none;
}

/* パスワード設定リンク */
.password-reset {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
}

.password-reset button {
    background: none;
    border: none;
    color: var(--primary-color);
    text-decoration: underline;
    cursor: pointer;
    font-size: 14px;
    padding: 8px 12px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.password-reset button:hover {
    background: rgba(194, 99, 156, 0.1);
    color: var(--primary-dark);
    text-decoration: none;
}

.alert {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    display: none;
}

.alert-success {
    background: #e8f5e8;
    color: #2d5a2d;
    border: 1px solid #c3e6c3;
}

.alert-error {
    background: #fce8e8;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid #ffffff40;
    border-top: 2px solid #ffffff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* 言語切替ボタン */
.lang-switcher {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    border-radius: 25px;
    padding: 5px;
    box-shadow: 0 4px 15px rgba(194, 99, 156, 0.1);
    z-index: 1000;
}

.lang-btn {
    background: none;
    border: none;
    padding: 8px 15px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s ease;
    color: #7f8c8d;
}

.lang-btn.active {
    background: var(--primary-color);
    color: white;
}

/* モーダルスタイル */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    display: none;
    justify-content: center;
    align-items: center;
    overflow-y: auto;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.show {
    display: flex !important;
    opacity: 1;
}

.modal-content {
    background: white;
    border-radius: 15px;
    width: 90%;
    max-width: 500px;
    display: flex;
    flex-direction: column;
    position: relative;
    box-shadow: 0 10px 30px rgba(194, 99, 156, 0.3);
    overflow: hidden;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.modal-overlay.show .modal-content {
    transform: scale(1);
}

.modal-header {
    background: var(--gradient-primary);
    color: white;
    padding: 20px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin: 0;
}

.close-btn {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 18px;
    padding: 5px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.modal-body {
    padding: 25px;
}

/* ログアウト通知 */
.logout-notification {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1001;
    animation: slideDown 0.5s ease-out;
}

.logout-message {
    background: #e8f5e8;
    color: #2d5a2d;
    border: 1px solid #c3e6c3;
    border-radius: 8px;
    padding: 12px 20px;
    box-shadow: 0 4px 15px rgba(194, 99, 156, 0.1);
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
}

/* 背景画像 */
.background-image {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-image: url('../image-data/bgphoto.jpg');
    background-size: cover;
    background-position: left top;
    opacity: 0.5;
    z-index: -1;
}

/* アニメーション */
@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

@keyframes slideUp {
    from {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }

    to {
        opacity: 0;
        transform: translateX(-50%) translateY(-20px);
    }
}

/* レスポンシブ対応 */
@media (max-width: 960px) {
    .auth-container {
        width: calc(100% - 40px);
        margin: 0 20px 40px;
    }
}

@media (max-width: 768px) {
    .auth-container {
        width: calc(100% - 20px);
        margin: 0 10px 40px;
    }

    .auth-header {
        padding: 20px 25px;
    }

    .auth-content {
        padding: 25px;
    }

    .auth-title {
        font-size: 1.5rem;
    }

    .modal-content {
        width: calc(100% - 20px);
        max-width: 450px;
    }

    .modal-body {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    header {
        height: auto;
        padding: 15px 20px;
    }

    .logo img {
        height: 80px;
        margin-top: 10px;
    }

    .auth-container {
        width: calc(100% - 20px);
        margin: 0 10px 40px;
    }

    .auth-header {
        padding: 20px;
    }

    .auth-content {
        padding: 20px;
    }

    .auth-title {
        font-size: 1.3rem;
        flex-direction: column;
        gap: 8px;
    }

    .auth-subtitle {
        font-size: 0.9rem;
    }

    .login-form-title {
        font-size: 1.2rem;
    }

    .input-group input {
        padding: 12px;
        font-size: 14px;
    }

    .submit-btn {
        padding: 12px 16px;
        font-size: 14px;
    }

    .modal-content {
        width: calc(100% - 10px);
    }

    .modal-header {
        padding: 15px 20px;
    }

    .modal-title {
        font-size: 1.1rem;
    }

    .modal-body {
        padding: 15px 20px 20px;
    }

    .lang-switcher {
        top: 15px;
        right: 15px;
    }

    .lang-btn {
        padding: 6px 12px;
        font-size: 11px;
    }
}