body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    min-height: 100vh;
    /* display: flex;
    align-items: center;
    justify-content: center; */
}

.login-container {
    background: rgba(250, 250, 250, 0.9);
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    padding: 2% 5%;
    width: 80%;
    max-width: 400px;
    max-height: 75%;
    text-align: center;
    margin: auto;
    overflow-y: auto;
    scrollbar-width: thin;
}

.login-container .logo img {
    width: 18%;
    height: 18%;
    border-radius: 50%;
    border: 1px solid #999;
}

.login-container .db-spiral img {
    width: 70%;
    background-color: #ffffff60;
    margin: 2%;
    border-radius: 20px;
}

.app-title {
    font-size: 2rem;
    color: #333;
    margin-top: 0;
    margin-bottom: 10px;
    font-weight: 600;
}

.subtitle {
    color: #666;
    margin-bottom: 30px;
    font-size: 1rem;
}

.sso-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.sso-button {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 20px;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    gap: 10px;
}

.sso-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.google-sso {
    background: #fff;
    color: #333;
    border: 2px solid #ddd;
}

.google-sso:hover {
    border-color: #4285f4;
}

.microsoft-sso {
    background: #0078d4;
    color: white;
}

.microsoft-sso:hover {
    background: #106ebe;
}

.github-sso {
    background: #333;
    color: white;
}

.github-sso:hover {
    background: #24292e;
}

.divider {
    margin: 25px 0;
    position: relative;
    text-align: center;
}

.divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #e0e0e0;
}

.divider span {
    background: white;
    padding: 0 15px;
    color: #666;
    font-size: 0.9rem;
}

.email-toggle {
    background: #fff;
    color: #333;
    border: 2px solid #ddd;
}

.email-toggle:hover {
    border-color: #4285f4;
}

/* メールログインフォーム */
.email-form {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.4s ease, opacity 0.3s ease;
    margin-top: 10px;
    background-color: #f9fafb;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.05);
    padding: 0 10px;
}

.email-form.active {
    max-height: 500px; /* 内容に合わせて調整 */
    opacity: 1;
    padding: 20px 10px;
}

/* メールフォーム内の入力フィールド */
.email-form .form-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 15px;
}

.email-form label {
    font-weight: 600;
    font-size: 0.9rem;
    color: #374151;
    margin-bottom: 5px;
}

.email-form input {
    padding: 10px 12px;
    border-radius: 10px;
    border: 1.5px solid #d1d5db;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.email-form input:focus {
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
    outline: none;
}

/* メールログイン用ボタン */
.email-form .submit-btn {
    margin-top: 10px;
    padding: 10px 0;
    border: none;
    border-radius: 10px;
    background: #667eea;
    color: white;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}

.email-form .submit-btn:hover {
    background: #5a67d8;
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(102, 126, 234, 0.3);
}

/* メール切替ボタンの開閉状態 */
.email-toggle.active {
    background-color: #ddd;
    color: white;
}

.error-message {
    background: #ffebee;
    color: #c62828;
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 0.9rem;
}

.success-message {
    background: #e8f5e8;
    color: #2e7d32;
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 0.9rem;
}

.footer {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
    color: #666;
    font-size: 0.85rem;
}

.footer a {
    color: #667eea;
    text-decoration: none;
}

.footer a:hover {
    text-decoration: underline;
}

/* アクションボタンのコンテナ */
.action-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

/* 新規登録リンクのスタイル */
.registration-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 16px;
    background: #fff;
    border: 2px solid #667eea;
    border-radius: 10px;
    color: #667eea;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    flex: 1;
    min-width: 150px;
}

.registration-link:hover {
    background: #667eea;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.registration-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

/* 新規契約リンクのスタイル */
.contract-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 16px;
    background: #fff;
    border: 2px solid #667eea;
    border-radius: 10px;
    color: #667eea;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    flex: 1;
    min-width: 150px;
}

.contract-link:hover {
    background: #667eea;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.contract-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.footer p {
    margin-top: 16px;
}

footer {
    padding: 0;
    background: none;
    color: #ffffffa6;
    border: none;
    box-shadow: none;
    justify-content: center;
    margin: 0 auto;
}

footer p {
    margin-left: 1%;
}

@media (max-width: 480px) {
    .login-container {
        margin: auto;
        padding: 30px 20px 0px 20px;
    }
    
    .subtitle {
        font-size: small;
    }
    
    .action-buttons {
        flex-direction: column;
        gap: 8px;
    }
    
    .registration-link,
    .contract-link {
        font-size: 0.85rem;
        padding: 8px 12px;
        min-width: auto;
    }
    
    .registration-icon,
    .contract-icon {
        width: 16px;
        height: 16px;
    }
}