@import "variables.css";

/**
 * form-pages.css - フォームページ共通スタイル
 *
 * 使用するページ:
 * - forgot_password.html
 * - forgot_email.html
 * - reset_password_form.html
 * - subscription-success.html
 *
 * 依存: variables.css, base.css, components.css
 */
/* 注意: カラー変数は variables.css で定義されています */

/* リセットスタイル */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Helvetica Neue', Arial, 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', Meiryo, sans-serif;
}

body {
    color: var(--text);
    background-color: var(--light-bg);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ヘッダー */
header {
    background-color: var(--color-header-bg);
    color: var(--color-header-text);
    padding: 15px 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 24px;
    font-weight: bold;
    display: flex;
    align-items: center;
}

.logo a {
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
    transition: opacity 0.3s;
}

.logo a:hover {
    opacity: 0.8;
}

.logo i {
    margin-right: 10px;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 20px;
}

.nav-links a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    padding: 5px 10px;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.nav-links a:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

/* メインコンテンツ */
main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

/* カード/コンテナ */
.card,
.reset-container,
.success-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px var(--shadow);
    max-width: 450px;
    width: 100%;
    padding: 40px;
}

.success-container {
    max-width: 600px;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    padding: 60px 40px;
    text-align: center;
}

/* ヘッダーセクション */
.card-header,
.reset-header {
    text-align: center;
    margin-bottom: 30px;
}

.card-header i,
.reset-header i {
    font-size: 48px;
    color: var(--accent);
    margin-bottom: 15px;
}

.card-header h1,
.reset-header h1 {
    font-size: 28px;
    color: var(--primary);
    margin-bottom: 10px;
}

.card-header p,
.reset-header p {
    font-size: 14px;
    color: #718096;
}

/* フォームグループ */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text);
    font-weight: 600;
    font-size: 14px;
}

.form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: var(--secondary);
    box-shadow: 0 0 0 3px rgba(72, 187, 120, 0.1);
}

/* パスワード入力ラッパー */
.password-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-wrapper input {
    width: 100%;
    padding-right: 45px !important;
}

.password-toggle {
    position: absolute;
    right: 10px;
    cursor: pointer;
    user-select: none;
    font-size: 20px;
    color: #666;
    background: none;
    border: none;
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.password-toggle:hover {
    color: #333;
}

.password-reveal-overlay {
    position: absolute;
    left: 0;
    top: 0;
    width: calc(100% - 45px);
    height: 100%;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 10px;
    display: none;
    align-items: center;
    z-index: 10;
    pointer-events: none;
    font-family: inherit;
    font-size: inherit;
    color: #2d3748;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.password-reveal-overlay.show {
    display: flex;
}

/* IME警告 */
.ime-warning {
    color: #d32f2f;
    font-size: 12px;
    margin-top: 5px;
    display: none;
    animation: fadeIn 0.3s;
}

.ime-warning.show {
    display: block;
}

/* メッセージ */
.message {
    padding: 12px 15px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 14px;
    display: none;
}

.message.show {
    display: block;
}

.message.error {
    background-color: #fff5f5;
    border: 1px solid #fc8181;
    color: var(--error);
}

.message.success {
    background-color: #f0fff4;
    border: 1px solid #9ae6b4;
    color: var(--success);
}

/* アラート */
.alert {
    border-radius: 8px;
    padding: 16px 20px;
    margin: 20px 0;
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.alert i {
    font-size: 20px;
    margin-top: 2px;
}

.alert-info {
    background-color: #e6f7ff;
    border: 1px solid #91d5ff;
    color: #0050b3;
}

.alert-info i {
    color: var(--info);
}

.alert-success {
    background-color: #f0f9ff;
    border: 1px solid #7dd3fc;
    color: #0c4a6e;
}

.alert-success i {
    color: #0ea5e9;
}

.alert-error {
    background-color: #fef2f2;
    border: 1px solid #fca5a5;
    color: #991b1b;
}

.alert-error i {
    color: var(--danger);
}

/* ボタン */
.btn {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
}

.btn-primary {
    background-color: var(--secondary);
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background-color: #5ab885;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(107, 199, 153, 0.3);
}

.btn-primary:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    background-color: white;
    color: var(--primary);
    border: 1px solid var(--border);
    margin-top: 10px;
}

.btn-secondary:hover {
    background-color: #f8f9fa;
}

/* グラデーションボタン */
.btn-gradient {
    display: inline-block;
    background: var(--gradient-brand);
    color: white;
    padding: 15px 40px;
    border-radius: 30px;
    text-decoration: none;
    font-size: 18px;
    font-weight: 600;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-gradient:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

/* インフォボックス */
.info-box {
    background: linear-gradient(135deg, #ebf8ff 0%, #e6fffa 100%);
    border-radius: 8px;
    padding: 15px;
    margin-top: 25px;
    border: 1px solid #bee3f8;
}

.info-box h3 {
    color: var(--primary);
    font-size: 14px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.info-box p {
    font-size: 13px;
    color: #4a5568;
    margin: 0;
}

/* バックリンク */
.back-link {
    text-align: center;
    margin-top: 25px;
}

.back-link a {
    color: var(--accent);
    text-decoration: none;
    font-size: 15px;
}

.back-link a:hover {
    text-decoration: underline;
}

/* ローディング */
.loading {
    text-align: center;
    padding: 40px;
}

.loading.active {
    display: block;
}

.loading i {
    font-size: 48px;
    color: var(--secondary);
    animation: spin 1s linear infinite;
}

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--color-primary);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

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

/* 成功アイコン */
.success-icon {
    width: 100px;
    height: 100px;
    margin: 0 auto 30px;
    background: var(--gradient-brand);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: scaleIn 0.5s ease-out;
}

.success-icon::after {
    content: '✓';
    font-size: 60px;
    color: white;
    font-weight: bold;
}

@keyframes scaleIn {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* プラン情報 */
.plan-info {
    background: #f7fafc;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 30px;
    text-align: left;
}

.plan-info h2 {
    font-size: 20px;
    color: #2d3748;
    margin-bottom: 15px;
}

.plan-detail {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #e2e8f0;
}

.plan-detail:last-child {
    border-bottom: none;
}

.plan-label {
    color: #718096;
    font-weight: 500;
}

.plan-value {
    color: #2d3748;
    font-weight: 600;
}

/* フッター */
footer {
    background-color: var(--primary);
    color: white;
    text-align: center;
    padding: 20px;
    margin-top: auto;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
}

.copyright {
    font-size: 14px;
    opacity: 0.8;
}

footer a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    margin: 0 10px;
}

footer a:hover {
    color: white;
}

/* レスポンシブ */
@media (max-width: 768px) {
    .nav-links {
        gap: 10px;
        font-size: 14px;
    }

    .card,
    .reset-container {
        padding: 30px 20px;
        margin: 20px;
    }

    .success-container {
        padding: 40px 20px;
        margin: 20px;
    }

    .card-header h1,
    .reset-header h1 {
        font-size: 24px;
    }
}
