/* 太占（フトマニ）占いアプリ - カスタムスタイル */

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

/* 濃い青テーマのカスタム変数 */
:root {
    --futomani-primary: #1e3a8a;
    --futomani-secondary: #3730a3;
    --futomani-accent: #FFD700;
    --futomani-light: #dbeafe;
    --futomani-dark: #1e1b4b;
}

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

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

@keyframes bounce {
    0%, 20%, 53%, 80%, 100% {
        transform: translate3d(0,0,0);
    }
    40%, 43% {
        transform: translate3d(0, -10px, 0);
    }
    70% {
        transform: translate3d(0, -5px, 0);
    }
    90% {
        transform: translate3d(0, -2px, 0);
    }
}

@keyframes glow {
    0% {
        box-shadow: 0 0 5px rgba(30, 58, 138, 0.3);
    }
    50% {
        box-shadow: 0 0 20px rgba(30, 58, 138, 0.6);
    }
    100% {
        box-shadow: 0 0 5px rgba(30, 58, 138, 0.3);
    }
}

/* 太占の特別なスタイリング */
.futomani-card {
    background: linear-gradient(135deg, #dbeafe 0%, #ffffff 100%);
    border: 2px solid #3730a3;
    transition: all 0.3s ease;
}

.futomani-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(30, 58, 138, 0.15);
}

/* 3音霊の特別スタイル */
.triad-sound {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    animation: glow 3s ease-in-out infinite;
    transition: all 0.3s ease;
}

.triad-sound:hover {
    transform: scale(1.1);
    animation-duration: 1s;
}

/* 結果表示のアニメーション */
.result-section {
    animation: fadeIn 0.8s ease-out;
}

.result-section > div {
    animation: slideIn 0.6s ease-out;
}

.result-section > div:nth-child(2) {
    animation-delay: 0.2s;
}

.result-section > div:nth-child(3) {
    animation-delay: 0.4s;
}

.result-section > div:nth-child(4) {
    animation-delay: 0.6s;
}

/* フォームスタイリング */
.form-input:focus {
    outline: none;
    border-color: #8B4513;
    box-shadow: 0 0 0 3px rgba(139, 69, 19, 0.1);
}

/* ボタンのホバーエフェクト */
.btn-primary {
    background: linear-gradient(135deg, #1e3a8a 0%, #1e1b4b 100%);
    transition: all 0.3s ease;
    cursor: pointer;
    pointer-events: auto;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #1e1b4b 0%, #1e3a8a 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(30, 58, 138, 0.3);
}

/* 太占ボタンの特別スタイル */
#fortuneButton {
    cursor: pointer !important;
    pointer-events: auto !important;
    position: relative;
    z-index: 10;
}

#fortuneButton:active {
    transform: translateY(1px);
}

.btn-secondary {
    background: linear-gradient(135deg, #3730a3 0%, #1e3a8a 100%);
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #1e3a8a 0%, #3730a3 100%);
    transform: translateY(-1px);
}

/* ローディングアニメーション */
.loading-spinner {
    animation: spin 1s linear infinite;
}

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

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .triad-sound {
        width: 3rem;
        height: 3rem;
        font-size: 1.5rem;
    }
    
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .btn-group {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .btn-group button {
        width: 100%;
    }
}

/* プリント対応 */
@media print {
    .no-print {
        display: none !important;
    }
    
    body {
        background: white !important;
    }
    
    .bg-gradient-to-br {
        background: white !important;
    }
    
    .shadow-lg, .shadow-md {
        box-shadow: none !important;
        border: 1px solid #ccc !important;
    }
}

/* アクセシビリティ対応 */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* フォーカス表示 */
button:focus,
input:focus,
textarea:focus,
summary:focus {
    outline: 2px solid #8B4513;
    outline-offset: 2px;
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #8B4513;
}

/* セレクション（テキスト選択）のスタイル */
::selection {
    background-color: rgba(139, 69, 19, 0.3);
    color: #654321;
}

::-moz-selection {
    background-color: rgba(139, 69, 19, 0.3);
    color: #654321;
}

/* 太占カードのグラデーション背景 */
.futomani-bg {
    background: linear-gradient(135deg, 
        rgba(245, 245, 220, 0.8) 0%, 
        rgba(255, 255, 255, 0.9) 50%, 
        rgba(255, 215, 0, 0.1) 100%);
}

/* メッセージボックスのスタイル */
.message-box {
    background: linear-gradient(135deg, 
        rgba(245, 245, 220, 0.5) 0%, 
        rgba(255, 255, 255, 0.8) 100%);
    border-left: 4px solid #D2691E;
}

/* 実践方法のステップ表示 */
.practice-step {
    position: relative;
    background: rgba(245, 245, 220, 0.3);
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 0.75rem;
    transition: all 0.3s ease;
}

.practice-step:hover {
    background: rgba(245, 245, 220, 0.5);
    transform: translateX(5px);
}

.practice-step::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(to bottom, #FFD700, #D2691E);
    border-radius: 0.25rem 0 0 0.25rem;
}

/* コピー成功のアニメーション */
.copy-success {
    animation: bounce 0.6s ease-out;
}

/* グリッドレイアウト for FAQ */
.faq-grid {
    display: grid;
    gap: 1rem;
}

@media (min-width: 768px) {
    .faq-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* 特別な文字のスタイリング */
.japanese-emphasis {
    font-family: 'Noto Serif JP', serif;
    font-weight: 500;
    color: #8B4513;
    text-shadow: 1px 1px 2px rgba(139, 69, 19, 0.1);
}

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

.tooltip .tooltiptext {
    visibility: hidden;
    width: 200px;
    background-color: rgba(0, 0, 0, 0.8);
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 8px;
    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;
}

/* モバイル専用スタイル */
@media (max-width: 640px) {
    .mobile-stack {
        flex-direction: column;
    }
    
    .mobile-full {
        width: 100%;
    }
    
    .mobile-text-sm {
        font-size: 0.875rem;
    }
    
    .mobile-p-4 {
        padding: 1rem;
    }
}