/* ==================== 認証システムのスタイル ==================== */

/* サインインボタン */
.sign-in-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: white;
    border: 1px solid #dadce0;
    border-radius: 24px;
    font-family: 'Kosugi Maru', sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: #3c4043;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.sign-in-btn:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    background: #f8f9fa;
}

.sign-in-btn:active {
    background: #f1f3f4;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* ユーザープロフィール */
.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 24px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.profile-pic {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid #e0e0e0;
}

.user-profile span {
    font-family: 'Kosugi Maru', sans-serif;
    font-weight: 500;
    color: #333;
    font-size: 14px;
}

.sign-out-btn {
    padding: 6px 12px;
    background: #f44336;
    color: white;
    border: none;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s ease;
}

.sign-out-btn:hover {
    background: #d32f2f;
}

/* ユーザー情報表示 */
.user-stats {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    margin: 16px 0;
}

.user-name {
    font-size: 18px;
    font-weight: 700;
    font-family: 'Kosugi Maru', sans-serif;
}

.user-points {
    font-size: 16px;
    font-weight: 600;
    color: #ffd700;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.user-stats small {
    font-size: 12px;
    opacity: 0.8;
    margin-top: 8px;
}

/* 通知メッセージ */
.auth-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 12px 20px;
    border-radius: 8px;
    color: white;
    font-family: 'Kosugi Maru', sans-serif;
    font-weight: 500;
    z-index: 10000;
    animation: slideIn 0.3s ease;
    max-width: 300px;
    word-wrap: break-word;
}

.auth-notification.success {
    background: #4caf50;
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

.auth-notification.error {
    background: #f44336;
    box-shadow: 0 4px 12px rgba(244, 67, 54, 0.3);
}

.auth-notification.info {
    background: #2196f3;
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.3);
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* 認証エリアのレイアウト */
.auth-area {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 16px 0;
    flex-wrap: wrap;
}

.auth-button-container {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ポイント獲得アニメーション */
.points-earned {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(135deg, #ffd700 0%, #ffb300 100%);
    color: white;
    padding: 20px 30px;
    border-radius: 16px;
    font-size: 24px;
    font-weight: 700;
    font-family: 'Kosugi Maru', sans-serif;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    z-index: 10001;
    animation: pointsPopup 2s ease;
}

@keyframes pointsPopup {
    0% {
        transform: translate(-50%, -50%) scale(0);
        opacity: 0;
    }
    20% {
        transform: translate(-50%, -50%) scale(1.2);
        opacity: 1;
    }
    80% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(0.8);
        opacity: 0;
    }
}

/* レスポンシブデザイン */
@media (max-width: 768px) {
    .auth-area {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }
    
    .user-profile {
        justify-content: center;
    }
    
    .user-stats {
        text-align: center;
    }
    
    .auth-notification {
        right: 10px;
        left: 10px;
        max-width: none;
    }
}

/* ナビゲーションバーに組み込む場合 */
.navbar .auth-area {
    margin: 0;
}

.navbar .user-profile {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
}

.navbar .user-profile span {
    color: white;
}

.navbar .sign-in-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    backdrop-filter: blur(10px);
}

.navbar .sign-in-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}