/**
 * 認証ページ用CSS - スタイリッシュなモダンデザイン
 * ログイン・登録ページのスタイル
 */

/* 認証メインコンテナ */
.auth-main {
    min-height: 100vh;
    padding: 0;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 25%, #2a2a2a 50%, #1a1a1a 75%, #0a0a0a 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

/* アニメーション背景エフェクト - 青色テーマ */
.auth-main::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: 
        radial-gradient(circle at 20% 30%, rgba(0, 212, 255, 0.25) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(0, 150, 255, 0.2) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(0, 100, 200, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 30% 80%, rgba(0, 180, 255, 0.18) 0%, transparent 50%);
    animation: backgroundPulse 8s ease-in-out infinite;
    z-index: 0;
}

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

.auth-container {
    max-width: 450px;
    width: 100%;
    padding: var(--spacing-md);
    position: relative;
    z-index: 1;
}

/* 認証カード - グラスモーフィズム効果（青色テーマ） */
.auth-card {
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: var(--spacing-xl);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(0, 212, 255, 0.2),
        inset 0 1px 0 rgba(0, 212, 255, 0.1),
        0 0 60px rgba(0, 212, 255, 0.1);
    border: 1px solid rgba(0, 212, 255, 0.3);
    position: relative;
    overflow: hidden;
    animation: cardFadeIn 0.6s ease-out;
}

@keyframes cardFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* カードの光るエフェクト - 青色 */
.auth-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(0, 212, 255, 0.2),
        rgba(0, 150, 255, 0.15),
        transparent
    );
    transition: left 0.5s ease;
}

.auth-card:hover::before {
    left: 100%;
}

.auth-header {
    text-align: center;
    margin-bottom: var(--spacing-xl);
    position: relative;
}

.auth-header h1 {
    font-size: 2.5rem;
    margin-bottom: var(--spacing-sm);
    background: linear-gradient(135deg, #00d4ff 0%, #0096ff 50%, #0066ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    font-weight: 700;
    letter-spacing: -0.5px;
    animation: titleGlow 3s ease-in-out infinite;
    text-shadow: 0 0 30px rgba(0, 212, 255, 0.5);
}

@keyframes titleGlow {
    0%, 100% {
        filter: brightness(1);
    }
    50% {
        filter: brightness(1.2);
    }
}

.auth-header h1 i {
    background: linear-gradient(135deg, #00d4ff 0%, #0096ff 50%, #0066ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 2rem;
    animation: iconPulse 2s ease-in-out infinite;
    filter: drop-shadow(0 0 10px rgba(0, 212, 255, 0.6));
}

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

.auth-header p {
    color: var(--aiqon-white);
    font-size: 1rem;
    line-height: 1.6;
    margin-top: var(--spacing-sm);
}

/* フォーム */
.auth-form {
    margin-top: var(--spacing-lg);
}

.form-group {
    margin-bottom: var(--spacing-lg);
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: var(--spacing-sm);
    color: var(--aiqon-white);
    font-weight: 500;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    transition: color 0.3s ease;
}

.form-group:focus-within label {
    color: var(--aiqon-blue);
}

.form-group label i {
    color: var(--aiqon-blue);
    font-size: 1rem;
    width: 20px;
    text-align: center;
}

.required {
    color: var(--aiqon-red);
    margin-left: 4px;
}

/* 入力フィールド - モダンなスタイル */
.form-control {
    width: 100%;
    padding: var(--spacing-md) var(--spacing-lg);
    background: rgba(42, 42, 42, 0.6);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(0, 212, 255, 0.1);
    border-radius: 12px;
    color: var(--aiqon-white);
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
    position: relative;
}

.form-control:hover {
    border-color: rgba(0, 212, 255, 0.3);
    background: rgba(42, 42, 42, 0.8);
}

.form-control:focus {
    outline: none;
    border-color: var(--aiqon-blue);
    background: rgba(42, 42, 42, 0.9);
    box-shadow: 
        0 0 0 4px rgba(0, 212, 255, 0.15),
        0 4px 12px rgba(0, 212, 255, 0.2);
    transform: translateY(-2px);
}

.form-control::placeholder {
    color: var(--aiqon-dark-300);
    opacity: 0.7;
}

.form-help {
    display: block;
    margin-top: var(--spacing-xs);
    font-size: 0.85rem;
    color: var(--aiqon-dark-300);
}

/* ボタン - グラデーションとアニメーション */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-xs);
    padding: var(--spacing-md) var(--spacing-xl);
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    position: relative;
    overflow: hidden;
    letter-spacing: 0.5px;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.2),
        transparent
    );
    transition: left 0.5s ease;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, #00d4ff 0%, #0096ff 50%, #0066ff 100%);
    color: var(--aiqon-white);
    box-shadow: 
        0 4px 20px rgba(0, 212, 255, 0.4),
        0 0 30px rgba(0, 150, 255, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(0, 212, 255, 0.5);
    position: relative;
}

.btn-primary::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, transparent 100%);
    border-radius: 12px;
    pointer-events: none;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 
        0 8px 30px rgba(0, 212, 255, 0.5),
        0 0 40px rgba(0, 150, 255, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    border-color: rgba(0, 212, 255, 0.7);
    background: linear-gradient(135deg, #00e5ff 0%, #00a6ff 50%, #0076ff 100%);
}

.btn-primary:active {
    transform: translateY(-1px);
}

.btn-block {
    width: 100%;
    padding: var(--spacing-md) var(--spacing-lg);
    font-size: 1.1rem;
    font-weight: 600;
}

/* アラート - 改善されたスタイル */
.alert {
    padding: var(--spacing-md) var(--spacing-lg);
    border-radius: 12px;
    margin-bottom: var(--spacing-lg);
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-sm);
    backdrop-filter: blur(10px);
    animation: alertSlideIn 0.4s ease-out;
}

@keyframes alertSlideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.alert i {
    font-size: 1.3rem;
    flex-shrink: 0;
    margin-top: 2px;
}

.alert-success {
    background: rgba(0, 255, 136, 0.15);
    border: 1px solid rgba(0, 255, 136, 0.3);
    color: var(--aiqon-green);
    box-shadow: 0 4px 15px rgba(0, 255, 136, 0.1);
}

.alert-error {
    background: rgba(255, 51, 102, 0.15);
    border: 1px solid rgba(255, 51, 102, 0.3);
    color: var(--aiqon-red);
    box-shadow: 0 4px 15px rgba(255, 51, 102, 0.1);
}

.alert ul {
    margin: 0;
    padding-left: var(--spacing-md);
    list-style: disc;
}

.alert li {
    margin-bottom: var(--spacing-xs);
}

.alert a {
    color: inherit;
    text-decoration: underline;
    transition: opacity 0.3s ease;
}

.alert a:hover {
    opacity: 0.8;
    text-decoration: none;
}

/* 認証フッター */
.auth-footer {
    margin-top: var(--spacing-xl);
    text-align: center;
    padding-top: var(--spacing-lg);
    border-top: 1px solid rgba(0, 212, 255, 0.1);
    position: relative;
}

.auth-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, #00d4ff 0%, #0096ff 50%, #0066ff 100%);
    border-radius: 2px;
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
}

.auth-footer p {
    color: var(--aiqon-dark-200);
    margin: 0;
    font-size: 0.95rem;
}

.auth-footer a {
    color: var(--aiqon-blue);
    text-decoration: none;
    font-weight: 600;
    position: relative;
    transition: all 0.3s ease;
    display: inline-block;
}

.auth-footer a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #00d4ff 0%, #0096ff 50%, #0066ff 100%);
    transition: width 0.3s ease;
    box-shadow: 0 0 8px rgba(0, 212, 255, 0.6);
}

.auth-footer a:hover {
    color: var(--aiqon-white);
    transform: translateY(-2px);
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.6);
    opacity: 1;
}

.auth-footer a:hover::after {
    width: 100%;
}

/* レスポンシブデザイン */
@media (max-width: 768px) {
    .auth-main {
        padding: var(--spacing-md);
    }
    
    .auth-container {
        max-width: 100%;
    }
    
    .auth-card {
        padding: var(--spacing-lg);
        border-radius: 20px;
    }
    
    .auth-header h1 {
        font-size: 2rem;
    }
    
    .auth-header h1 i {
        font-size: 1.5rem;
    }
    
    .form-control {
        padding: var(--spacing-sm) var(--spacing-md);
    }
    
    .btn-block {
        padding: var(--spacing-sm) var(--spacing-md);
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .auth-card {
        padding: var(--spacing-md);
        border-radius: 16px;
    }
    
    .auth-header h1 {
        font-size: 1.75rem;
    }
    
    .auth-header p {
        font-size: 0.9rem;
    }
}

/* ダークモード対応の追加スタイル */
@media (prefers-color-scheme: dark) {
    .auth-card {
        background: rgba(15, 23, 42, 0.95);
        border-color: rgba(0, 212, 255, 0.4);
    }
    
    .form-control {
        background: rgba(15, 23, 42, 0.8);
        border-color: rgba(0, 212, 255, 0.3);
    }
}

/* アクセシビリティ - フォーカス表示の改善 */
.form-control:focus-visible,
.btn:focus-visible {
    outline: 2px solid var(--aiqon-blue);
    outline-offset: 2px;
}

/* ローディング状態（将来の拡張用） */
.btn.loading {
    pointer-events: none;
    opacity: 0.7;
}

.btn.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: var(--aiqon-white);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}
