/* 自分らしさダイエット講座 - カスタムスタイル */

/* スムーズスクロール */
html {
    scroll-behavior: smooth;
}

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

@keyframes pulse-soft {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

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

/* ヘッダーのアニメーション */
header {
    animation: slideInUp 0.8s ease-out;
}

/* フローティングアニメーション */
.float-animation {
    animation: float 3s ease-in-out infinite;
}

/* パルスアニメーション */
.pulse-animation {
    animation: pulse-soft 2s ease-in-out infinite;
}

/* ボタンホバーエフェクト */
.btn-hover-effect {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-hover-effect:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(244, 166, 205, 0.3);
}

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

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

/* カードホバーエフェクト */
.card-hover {
    transition: all 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
}

/* グラデーション背景のアニメーション */
.animated-gradient {
    background: linear-gradient(-45deg, #F8E8E8, #F4A6CD, #A8D8A8, #FFF8DC);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* セクション間のスムーズな遷移 */
section {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

section.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ハートアイコンの点滅アニメーション */
.heart-beat {
    animation: heartBeat 1.5s ease-in-out infinite;
}

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

/* 星評価のアニメーション */
.star-rating {
    display: inline-flex;
    animation: starShine 2s ease-in-out infinite;
}

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

/* フォーカス時のスタイル改善 */
input:focus {
    transform: scale(1.02);
    transition: all 0.3s ease;
}

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

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

::-webkit-scrollbar-thumb {
    background: #F4A6CD;
    border-radius: 4px;
}

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

/* 数字カウンターのスタイル */
.counter {
    font-family: 'Kiwi Maru', serif;
    font-weight: bold;
    color: #F4A6CD;
}

/* 特別な装飾要素 */
.decorative-element {
    position: relative;
}

.decorative-element::before {
    content: '✨';
    position: absolute;
    top: -10px;
    right: -10px;
    font-size: 1.2rem;
    animation: float 2s ease-in-out infinite;
}

/* モバイル対応の改善 */
@media (max-width: 768px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    h1, h2, h3 {
        line-height: 1.3;
    }
    
    .text-3xl {
        font-size: 1.8rem;
    }
    
    .text-4xl {
        font-size: 2.2rem;
    }
    
    .text-5xl {
        font-size: 2.8rem;
    }
}

/* 読み込みアニメーション */
.fade-in {
    opacity: 0;
    animation: fadeIn 1s ease-in-out forwards;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

/* ツールチップスタイル */
.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip .tooltiptext {
    visibility: hidden;
    width: 200px;
    background-color: rgba(0,0,0,0.8);
    color: white;
    text-align: center;
    border-radius: 6px;
    padding: 8px 12px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    margin-left: -100px;
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 0.875rem;
}

.tooltip:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
}

/* 成功メッセージのスタイル */
.success-message {
    background: linear-gradient(135deg, #A8D8A8, #90C695);
    color: white;
    padding: 1rem;
    border-radius: 0.5rem;
    margin-top: 1rem;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s ease;
}

.success-message.show {
    opacity: 1;
    transform: translateY(0);
}

/* パーティクル効果のスタイル */
.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: #F4A6CD;
    border-radius: 50%;
    animation: particleFloat 8s linear infinite;
    opacity: 0.6;
}

@keyframes particleFloat {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 0.6;
    }
    90% {
        opacity: 0.6;
    }
    100% {
        transform: translateY(-100px) rotate(360deg);
        opacity: 0;
    }
}

/* インタラクティブな要素の強調 */
.interactive-element {
    cursor: pointer;
    transition: all 0.3s ease;
}

.interactive-element:hover {
    transform: scale(1.05);
}

/* 印象的なテキスト装飾 */
.highlight-text {
    position: relative;
    display: inline-block;
}

.highlight-text::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, #F4A6CD, #FFB6C1);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.highlight-text:hover::after {
    transform: scaleX(1);
}

/* プログレスバーのスタイル */
.progress-bar {
    width: 100%;
    height: 8px;
    background-color: #F8E8E8;
    border-radius: 4px;
    overflow: hidden;
    margin: 1rem 0;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #F4A6CD, #FFB6C1);
    border-radius: 4px;
    transition: width 2s ease-in-out;
}

/* 特殊効果: 光る境界線 */
.glow-border {
    position: relative;
    border: 2px solid transparent;
    background: linear-gradient(white, white) padding-box,
                linear-gradient(45deg, #F4A6CD, #FFB6C1) border-box;
    border-radius: 12px;
}

/* レスポンシブ画像の最適化 */
img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

/* アクセシビリティの改善 */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* フォーム要素の統一スタイル */
input[type="email"], 
input[type="text"], 
textarea {
    font-family: 'Noto Sans JP', sans-serif;
    transition: all 0.3s ease;
}

input[type="email"]:focus, 
input[type="text"]:focus, 
textarea:focus {
    box-shadow: 0 0 0 3px rgba(244, 166, 205, 0.3);
}

/* 印刷時のスタイル */
@media print {
    .no-print {
        display: none !important;
    }
    
    body {
        font-size: 12px;
        color: black !important;
        background: white !important;
    }
}

/* 高コントラストモード対応 */
@media (prefers-contrast: high) {
    .text-gray-700 {
        color: #000 !important;
    }
    
    .bg-soft-pink {
        background-color: #FFE4E1 !important;
    }
}

/* ダークモード対応の基礎 */
@media (prefers-color-scheme: dark) {
    /* 必要に応じてダークモードスタイルを追加 */
}

/* パフォーマンス最適化 */
* {
    box-sizing: border-box;
}

.will-change-transform {
    will-change: transform;
}

.will-change-opacity {
    will-change: opacity;
}