/* カスタムスタイル */
* {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

/* アニメーション */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeIn 1s ease-out;
}

/* ホバー効果 */
.ai-card {
    transition: all 0.3s ease;
}

.ai-card:hover {
    transform: translateY(-10px);
}

.application-card {
    transition: all 0.3s ease;
}

.application-card:hover {
    transform: scale(1.05);
}

/* スクロールバーのカスタマイズ */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* ヒーローセクションの背景アニメーション */
.hero-section {
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(59, 130, 246, 0.1) 0%, rgba(147, 51, 234, 0.1) 100%);
    animation: gradient-shift 10s ease infinite;
}

@keyframes gradient-shift {
    0%, 100% {
        transform: translateX(0);
    }
    50% {
        transform: translateX(20px);
    }
}

/* クイズボタンのスタイル */
.quiz-option {
    transition: all 0.2s ease;
    cursor: pointer;
}

.quiz-option:hover {
    transform: translateX(5px);
}

.quiz-option.correct {
    background-color: #dcfce7;
    border-color: #16a34a;
}

.quiz-option.incorrect {
    background-color: #fee2e2;
    border-color: #dc2626;
}

/* レスポンシブ調整 */
@media (max-width: 768px) {
    .hero-section h2 {
        font-size: 2.5rem;
    }
    
    .hero-section p {
        font-size: 1.2rem;
    }
}

/* ローディングアニメーション */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3b82f6;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

/* 投稿セクションのスタイル */
.post-item {
    animation: slideIn 0.3s ease-out;
}

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

/* いいねボタンのホバーアニメーション */
.like-btn:hover i {
    animation: heartBeat 0.3s ease;
}

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

/* フォーカス時の入力フィールド */
input:focus, 
select:focus, 
textarea:focus {
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* バウンスアニメーション */
@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.animate-bounce {
    animation: bounce 0.5s ease;
}

/* 通知メッセージのアニメーション */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.animate-slide-in {
    animation: slideInRight 0.3s ease-out;
}

/* ユーザー写真のスタイル */
#userPhoto {
    object-fit: cover;
}

/* ログインが必要メッセージのアニメーション */
#loginRequired {
    animation: fadeIn 0.5s ease-out;
}
