* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Hiragino Kaku Gothic Pro', 'Meiryo', sans-serif;
    background: linear-gradient(to bottom, #87CEEB 0%, #E0F6FF 50%, #90EE90 100%);
    min-height: 100vh;
    overflow-x: hidden;
    padding: 20px;
    transition: background 1s ease-in-out;
}

/* 時間帯別の背景スタイル */
body.morning {
    background: linear-gradient(to bottom, #FFB347 0%, #FFCC99 30%, #87CEEB 60%, #90EE90 100%);
}

body.day {
    background: linear-gradient(to bottom, #87CEEB 0%, #E0F6FF 50%, #90EE90 100%);
}

body.evening {
    background: linear-gradient(to bottom, #FF6B35 0%, #FF8C61 30%, #FFA07A 50%, #DDA15E 100%);
}

body.night {
    background: linear-gradient(to bottom, #191970 0%, #000080 30%, #1C1C3C 60%, #2C2C54 100%);
}

/* 天気別の背景オーバーレイ */
body.weather-cloudy.morning {
    background: linear-gradient(to bottom, #B8B8B8 0%, #D3D3D3 30%, #A9A9A9 60%, #8B8B8B 100%);
}

body.weather-cloudy.day {
    background: linear-gradient(to bottom, #B0C4DE 0%, #D3D3D3 50%, #A9A9A9 100%);
}

body.weather-cloudy.evening {
    background: linear-gradient(to bottom, #8B7355 0%, #A0826D 30%, #8B8680 50%, #696969 100%);
}

body.weather-cloudy.night {
    background: linear-gradient(to bottom, #2F4F4F 0%, #36454F 30%, #1C1C1C 60%, #000000 100%);
}

body.weather-rainy.morning {
    background: linear-gradient(to bottom, #708090 0%, #778899 30%, #696969 60%, #556B2F 100%);
}

body.weather-rainy.day {
    background: linear-gradient(to bottom, #4682B4 0%, #5F9EA0 50%, #2F4F4F 100%);
}

body.weather-rainy.evening {
    background: linear-gradient(to bottom, #2F4F4F 0%, #36454F 30%, #1C1C1C 50%, #000000 100%);
}

body.weather-rainy.night {
    background: linear-gradient(to bottom, #000000 0%, #191970 30%, #0C0C1E 60%, #000000 100%);
}

body.weather-snowy.morning {
    background: linear-gradient(to bottom, #F0F8FF 0%, #E6E6FA 30%, #DCDCDC 60%, #C0C0C0 100%);
}

body.weather-snowy.day {
    background: linear-gradient(to bottom, #F0F8FF 0%, #E0FFFF 50%, #D3D3D3 100%);
}

body.weather-snowy.evening {
    background: linear-gradient(to bottom, #B0C4DE 0%, #9FB6CD 30%, #8B8989 50%, #696969 100%);
}

body.weather-snowy.night {
    background: linear-gradient(to bottom, #2F4F4F 0%, #36454F 30%, #1C1C3C 60%, #000000 100%);
}

/* 天気エフェクトコンテナ */
.weather-effect {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

/* 雨のエフェクト */
.rain {
    position: absolute;
    width: 2px;
    height: 50px;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.8));
    animation: fall linear infinite;
    opacity: 0.6;
}

@keyframes fall {
    0% {
        transform: translateY(-100px);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh);
        opacity: 0.3;
    }
}

/* 雪のエフェクト */
.snow {
    position: absolute;
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
    animation: snowfall linear infinite;
    opacity: 0.8;
    box-shadow: 0 0 5px rgba(255, 255, 255, 0.8);
}

@keyframes snowfall {
    0% {
        transform: translateY(-100px) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(360deg);
        opacity: 0.5;
    }
}

/* 雲のエフェクト */
.cloud {
    position: absolute;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 100px;
    animation: cloudDrift linear infinite;
    opacity: 0.5;
}

.cloud::before,
.cloud::after {
    content: '';
    position: absolute;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 100px;
}

.cloud::before {
    width: 50px;
    height: 50px;
    top: -25px;
    left: 10px;
}

.cloud::after {
    width: 60px;
    height: 60px;
    top: -30px;
    right: 10px;
}

@keyframes cloudDrift {
    0% {
        transform: translateX(-200px);
    }
    100% {
        transform: translateX(calc(100vw + 200px));
    }
}

/* 太陽のエフェクト */
.sun {
    position: fixed;
    width: 80px;
    height: 80px;
    background: radial-gradient(circle, #FFD700 0%, #FFA500 50%, rgba(255, 165, 0, 0) 70%);
    border-radius: 50%;
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.8),
                0 0 60px rgba(255, 215, 0, 0.5),
                0 0 90px rgba(255, 215, 0, 0.3);
    z-index: 2;
    pointer-events: none;
    transition: all 2s ease-in-out;
}

.sun::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100px;
    height: 100px;
    background: radial-gradient(circle, rgba(255, 215, 0, 0.3) 0%, rgba(255, 215, 0, 0) 70%);
    border-radius: 50%;
    animation: sunGlow 3s ease-in-out infinite;
}

@keyframes sunGlow {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.6;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.2);
        opacity: 0.8;
    }
}

/* 朝・夕の太陽は少しオレンジ色 */
.sun.sunrise,
.sun.sunset {
    background: radial-gradient(circle, #FF8C00 0%, #FF6347 50%, rgba(255, 99, 71, 0) 70%);
    box-shadow: 0 0 30px rgba(255, 140, 0, 0.8),
                0 0 60px rgba(255, 140, 0, 0.5),
                0 0 90px rgba(255, 140, 0, 0.3);
}

/* 月のエフェクト */
.moon {
    position: fixed;
    width: 70px;
    height: 70px;
    background: radial-gradient(circle at 30% 30%, #FFF8DC 0%, #F0E68C 40%, #DAA520 100%);
    border-radius: 50%;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.6),
                0 0 40px rgba(255, 255, 255, 0.4),
                0 0 60px rgba(255, 255, 255, 0.2);
    z-index: 2;
    pointer-events: none;
    transition: all 2s ease-in-out;
}

.moon::before {
    content: '';
    position: absolute;
    top: 15%;
    left: 20%;
    width: 15px;
    height: 15px;
    background: rgba(139, 69, 19, 0.2);
    border-radius: 50%;
}

.moon::after {
    content: '';
    position: absolute;
    bottom: 25%;
    right: 25%;
    width: 10px;
    height: 10px;
    background: rgba(139, 69, 19, 0.15);
    border-radius: 50%;
}

header {
    background-color: #1a1a1a;
    padding: 0.5rem 0;
    margin: -20px -20px 20px -20px;
}

header a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0 1rem;
    font-weight: bold;
    color: white;
    font-size: 1.125rem;
    text-decoration: none;
}

header img {
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    object-fit: cover;
}

.shrine-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    text-align: center;
    position: relative;
    z-index: 10;
}

/* 木のスタイル */
.tree {
    position: absolute;
    bottom: 15%;
    width: 80px;
    height: 200px;
    z-index: 5;
    transition: all 1s ease-in-out;
}

.tree.left {
    left: calc(50% - 450px);
}

.tree.right {
    right: calc(50% - 450px);
}

/* 小さい画面では調整 */
@media (max-width: 1200px) {
    .tree.left {
        left: 5%;
    }
    
    .tree.right {
        right: 5%;
    }
}

@media (max-width: 800px) {
    .tree {
        width: 60px;
        height: 150px;
    }
    
    .tree-trunk {
        width: 15px !important;
        height: 60px !important;
    }
    
    .tree-leaves {
        width: 60px !important;
        height: 90px !important;
        bottom: 45px !important;
    }
}

/* 木の幹 */
.tree-trunk {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 80px;
    background: linear-gradient(to right, #5D4037, #6D4C41, #5D4037);
    border-radius: 3px;
}

/* 木の葉（基本形） */
.tree-leaves {
    position: absolute;
    bottom: 60px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 120px;
    transition: all 1s ease-in-out;
}

.tree-leaves::before,
.tree-leaves::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    transition: all 1s ease-in-out;
}

/* 春（桜） */
.tree.spring .tree-leaves {
    background: radial-gradient(circle, #FFB7C5 0%, #FFC0CB 50%, rgba(255, 192, 203, 0) 70%);
}

.tree.spring .tree-leaves::before {
    width: 60px;
    height: 60px;
    background: radial-gradient(circle, #FFB7C5 0%, #FFC0CB 50%, rgba(255, 192, 203, 0) 70%);
    top: -20px;
    left: -10px;
}

.tree.spring .tree-leaves::after {
    width: 60px;
    height: 60px;
    background: radial-gradient(circle, #FFB7C5 0%, #FFC0CB 50%, rgba(255, 192, 203, 0) 70%);
    top: -20px;
    right: -10px;
}

/* 夏（緑） */
.tree.summer .tree-leaves {
    background: radial-gradient(circle, #228B22 0%, #32CD32 50%, rgba(50, 205, 50, 0) 70%);
}

.tree.summer .tree-leaves::before {
    width: 60px;
    height: 60px;
    background: radial-gradient(circle, #228B22 0%, #32CD32 50%, rgba(50, 205, 50, 0) 70%);
    top: -20px;
    left: -10px;
}

.tree.summer .tree-leaves::after {
    width: 60px;
    height: 60px;
    background: radial-gradient(circle, #228B22 0%, #32CD32 50%, rgba(50, 205, 50, 0) 70%);
    top: -20px;
    right: -10px;
}

/* 秋（紅葉） */
.tree.autumn .tree-leaves {
    background: radial-gradient(circle, #FF6347 0%, #FF8C00 30%, #FFD700 60%, rgba(255, 215, 0, 0) 80%);
}

.tree.autumn .tree-leaves::before {
    width: 60px;
    height: 60px;
    background: radial-gradient(circle, #FF4500 0%, #FF6347 50%, rgba(255, 99, 71, 0) 70%);
    top: -20px;
    left: -10px;
}

.tree.autumn .tree-leaves::after {
    width: 60px;
    height: 60px;
    background: radial-gradient(circle, #FFD700 0%, #FFA500 50%, rgba(255, 165, 0, 0) 70%);
    top: -20px;
    right: -10px;
}

/* 冬（枯れ木） */
.tree.winter .tree-leaves {
    background: radial-gradient(circle, #8B7355 0%, #A0826D 30%, rgba(160, 130, 109, 0) 60%);
    opacity: 0.5;
}

.tree.winter .tree-leaves::before {
    width: 40px;
    height: 40px;
    background: radial-gradient(circle, #8B7355 0%, #A0826D 50%, rgba(160, 130, 109, 0) 70%);
    top: -10px;
    left: 0;
    opacity: 0.6;
}

.tree.winter .tree-leaves::after {
    width: 40px;
    height: 40px;
    background: radial-gradient(circle, #8B7355 0%, #A0826D 50%, rgba(160, 130, 109, 0) 70%);
    top: -10px;
    right: 0;
    opacity: 0.6;
}

/* 桜の花びらのアニメーション（春のみ） */
.petal {
    position: absolute;
    width: 10px;
    height: 10px;
    background: #FFB7C5;
    border-radius: 50% 0 50% 0;
    opacity: 0.8;
    animation: petalFall linear infinite;
}

@keyframes petalFall {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 0.8;
    }
    100% {
        transform: translateY(100vh) rotate(360deg);
        opacity: 0;
    }
}

/* 紅葉の落ち葉アニメーション（秋のみ） */
.leaf {
    position: absolute;
    width: 15px;
    height: 15px;
    background: linear-gradient(45deg, #FF6347 0%, #FFD700 100%);
    clip-path: polygon(50% 0%, 100% 38%, 82% 100%, 18% 100%, 0% 38%);
    opacity: 0.9;
    animation: leafFall linear infinite;
}

@keyframes leafFall {
    0% {
        transform: translateY(0) rotate(0deg) translateX(0);
        opacity: 0.9;
    }
    50% {
        transform: translateY(50vh) rotate(180deg) translateX(20px);
    }
    100% {
        transform: translateY(100vh) rotate(360deg) translateX(0);
        opacity: 0;
    }
}

.shrine-title {
    font-size: 2.5em;
    color: #8B4513;
    margin: 20px 0;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.torii {
    width: 300px;
    height: 200px;
    margin: 0 auto 30px;
    position: relative;
}

.torii-pillar {
    width: 20px;
    height: 150px;
    background: linear-gradient(to right, #C41E3A, #8B0000);
    position: absolute;
    bottom: 0;
}

.torii-pillar.left {
    left: 30px;
}

.torii-pillar.right {
    right: 30px;
}

.torii-beam {
    height: 25px;
    background: linear-gradient(to bottom, #C41E3A, #8B0000);
    position: absolute;
    border-radius: 10px;
}

.torii-beam.top {
    width: 100%;
    top: 20px;
    transform: perspective(100px) rotateX(-2deg);
}

.torii-beam.bottom {
    width: 260px;
    top: 60px;
    left: 20px;
}

.main-hall {
    width: 400px;
    height: 250px;
    margin: 0 auto;
    position: relative;
    background: linear-gradient(to bottom, #8B4513 0%, #654321 100%);
    border-radius: 10px 10px 0 0;
}

.bell-container {
    position: absolute;
    top: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
}

.bell {
    width: 60px;
    height: 50px;
    background: linear-gradient(to bottom, #FFD700, #DAA520);
    border-radius: 0 0 30px 30px;
    position: relative;
    margin: 0 auto;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
    transition: transform 0.1s;
}

.bell::before {
    content: '';
    width: 50px;
    height: 10px;
    background: #8B7355;
    position: absolute;
    top: 0;
    left: 5px;
    border-radius: 5px;
}

.bell-clapper {
    width: 8px;
    height: 20px;
    background: #4A4A4A;
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 0 0 4px 4px;
}

.bell.ringing {
    animation: ringBell 0.5s ease-in-out;
}

@keyframes ringBell {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-15deg); }
    75% { transform: rotate(15deg); }
}

.suzuo {
    width: 15px;
    height: 150px;
    background: repeating-linear-gradient(
        to bottom,
        #FF0000 0px,
        #FF0000 10px,
        #FFFFFF 10px,
        #FFFFFF 20px
    );
    margin: 5px auto 0;
    cursor: pointer;
    position: relative;
    transition: transform 0.1s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.suzuo:hover {
    transform: scaleY(1.05);
}

.suzuo:active {
    transform: scaleY(0.95);
}

.suzuo-tassel {
    width: 40px;
    height: 40px;
    background: radial-gradient(circle, #FFD700, #FFA500);
    border-radius: 50% 50% 0 0;
    position: absolute;
    bottom: -35px;
    left: 50%;
    transform: translateX(-50%);
}

.suzuo-tassel::after {
    content: '';
    width: 20px;
    height: 20px;
    background: #FFD700;
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
}

.sound-effect {
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1.5em;
    font-weight: bold;
    color: #FFD700;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    animation: soundPop 0.8s ease-out;
    pointer-events: none;
    white-space: nowrap;
    writing-mode: horizontal-tb;
}

@keyframes soundPop {
    0% {
        opacity: 1;
        transform: translateX(-50%) scale(1);
    }
    100% {
        opacity: 0;
        transform: translateX(-50%) scale(1.5) translateY(-20px);
    }
}

.roof {
    width: 450px;
    height: 80px;
    background: linear-gradient(to bottom, #2C2C2C, #1A1A1A);
    position: absolute;
    top: -60px;
    left: -25px;
    clip-path: polygon(0 100%, 10% 0, 90% 0, 100% 100%);
}

.offering-box {
    width: 200px;
    height: 120px;
    margin: 40px auto;
    background: linear-gradient(to bottom, #8B7355, #654321);
    border: 4px solid #4A4A4A;
    border-radius: 10px;
    position: relative;
    box-shadow: 0 10px 20px rgba(0,0,0,0.3);
}

.offering-slot {
    width: 150px;
    height: 20px;
    background: #000;
    margin: 20px auto;
    border-radius: 5px;
    box-shadow: inset 0 2px 5px rgba(0,0,0,0.8);
}

.coin-button {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #FFD700, #FFA500);
    border: 4px solid #DAA520;
    font-size: 1.5em;
    color: #8B4513;
    cursor: pointer;
    margin: 20px auto;
    display: block;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    transition: transform 0.1s;
}

.coin-button:hover {
    transform: scale(1.1);
}

.coin-button:active {
    transform: scale(0.95);
}

.coin {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #FFD700, #FFA500);
    border: 3px solid #DAA520;
    position: absolute;
    pointer-events: none;
    animation: coinFall 1s ease-in;
    font-size: 0.8em;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #8B4513;
    font-weight: bold;
}

@keyframes coinFall {
    0% {
        transform: translateY(0) rotateZ(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(300px) rotateZ(720deg);
        opacity: 0;
    }
}

.counter {
    font-size: 1.5em;
    color: #8B4513;
    margin: 20px 0;
    font-weight: bold;
}

.blessing {
    font-size: 1.2em;
    color: #C41E3A;
    margin: 20px 0;
    min-height: 30px;
    font-weight: bold;
}

.instructions {
    color: #654321;
    margin: 20px 0;
    font-size: 1.1em;
}

.lantern {
    width: 40px;
    height: 80px;
    background: linear-gradient(to bottom, #C41E3A, #8B0000);
    border-radius: 10px;
    position: absolute;
    top: 200px;
}

.lantern.left {
    left: 50px;
}

.lantern.right {
    right: 50px;
}

.lantern::before {
    content: '';
    width: 35px;
    height: 35px;
    background: #FFD700;
    position: absolute;
    top: 20px;
    left: 2.5px;
    border-radius: 5px;
    opacity: 0.8;
}

.disclaimer {
    font-size: 0.85em;
    color: #888;
    margin-top: 40px;
    padding: 10px;
    opacity: 0.7;
}

/* おみくじの箱コンテナ - 神社の中 */
.omikuji-box-container {
    position: absolute;
    bottom: 40px;
    right: 30px;
    z-index: 8;
}

.omikuji-box {
    width: 100px;
    height: 100px;
    background: linear-gradient(to bottom, #D2691E, #8B4513);
    border: 3px solid #654321;
    border-radius: 10px;
    position: relative;
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
    display: flex;
    justify-content: center;
    align-items: flex-end;
    padding: 12px;
}

.omikuji-stick {
    width: 35px;
    height: 75px;
    background: linear-gradient(to right, #F5DEB3, #DEB887, #F5DEB3);
    border-radius: 12px 12px 3px 3px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.omikuji-stick::before {
    content: '';
    position: absolute;
    top: 5px;
    left: 50%;
    transform: translateX(-50%);
    width: 1px;
    height: 85%;
    background: linear-gradient(to bottom, rgba(139, 69, 19, 0.3), rgba(139, 69, 19, 0.1));
    z-index: 1;
}

.omikuji-stick-text {
    position: relative;
    font-size: 0.65em;
    color: #8B4513;
    font-weight: bold;
    writing-mode: vertical-rl;
    text-orientation: upright;
    z-index: 2;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.5);
    font-family: '游明朝', 'Yu Mincho', 'ヒラギノ明朝 ProN', 'Hiragino Mincho ProN', 'HG明朝E', serif;
    letter-spacing: 2px;
}

.omikuji-stick:hover {
    transform: translateY(-8px);
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.6);
}

.omikuji-stick:active {
    transform: translateY(-4px);
}

.omikuji-stick.pulled {
    animation: pullOut 0.5s ease-out;
}

@keyframes pullOut {
    0% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-30px) rotate(10deg);
    }
    100% {
        transform: translateY(0) rotate(0deg);
    }
}

/* おみくじモーダル */
.omikuji-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    animation: fadeIn 0.3s ease-in;
}

.omikuji-modal.show {
    display: block;
}

.omikuji-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
}

.omikuji-modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 650px;
    width: 92%;
    max-height: 85vh;
    overflow-y: auto;
    overflow-x: hidden;
    animation: slideUp 0.4s ease-out;
    padding: 20px 0;
    box-sizing: border-box;
}

.omikuji-modal-content.loading {
    background: white;
    padding: 40px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.loading-spinner {
    width: 50px;
    height: 50px;
    margin: 0 auto 20px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #DAA520;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.omikuji-modal-close {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #DAA520;
    color: white;
    border: 3px solid white;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.omikuji-modal-close:hover {
    background: #B8860B;
    transform: rotate(90deg);
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translate(-50%, -40%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

.omikuji-result {
    min-height: 150px;
    padding: 25px 20px;
    margin: 0 10px;
    background: linear-gradient(to bottom, #FFF8DC, #FFFACD);
    border: 4px solid #DAA520;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    box-sizing: border-box;
    max-width: 100%;
    overflow-wrap: break-word;
    word-wrap: break-word;
}

.omikuji-result-title {
    font-size: 2em;
    font-weight: bold;
    margin-bottom: 15px;
    text-align: center;
    font-family: '游明朝', 'Yu Mincho', 'ヒラギノ明朝 ProN', 'Hiragino Mincho ProN', 'HG明朝E', serif;
}

.omikuji-result-title.daikichi {
    color: #FF1493;
    text-shadow: 2px 2px 4px rgba(255, 20, 147, 0.3);
}

.omikuji-result-title.kichi {
    color: #FF6347;
    text-shadow: 2px 2px 4px rgba(255, 99, 71, 0.3);
}

.omikuji-result-title.chukichi {
    color: #FF8C00;
    text-shadow: 2px 2px 4px rgba(255, 140, 0, 0.3);
}

.omikuji-result-title.shokichi {
    color: #FFD700;
    text-shadow: 2px 2px 4px rgba(255, 215, 0, 0.3);
}

.omikuji-result-title.kyo {
    color: #696969;
    text-shadow: 2px 2px 4px rgba(105, 105, 105, 0.3);
}

.omikuji-result-content {
    font-size: 1em;
    line-height: 1.9;
    color: #654321;
    text-align: left;
    white-space: pre-line;
    font-family: '游明朝', 'Yu Mincho', 'ヒラギノ明朝 ProN', 'Hiragino Mincho ProN', 'HG明朝E', serif;
    font-weight: 500;
    overflow-wrap: break-word;
    word-wrap: break-word;
}

.omikuji-result-content > div {
    margin: 8px 0;
}

.omikuji-result-content strong {
    color: #8B4513;
    min-width: 60px;
    display: inline-block;
    font-weight: 600;
}

/* モーダルのレスポンシブ対応 */
@media (max-width: 800px) {
    .omikuji-box-container {
        right: 10px;
        bottom: 25px;
    }
    
    .omikuji-box {
        width: 70px;
        height: 70px;
        padding: 8px;
    }
    
    .omikuji-stick {
        width: 25px;
        height: 50px;
    }
    
    .omikuji-stick-text {
        font-size: 0.5em;
        letter-spacing: 1px;
    }
}

@media (max-width: 600px) {
    .omikuji-modal-content {
        width: 95%;
        max-height: 80vh;
        padding: 15px 5px;
    }
    
    .omikuji-modal-close {
        width: 35px;
        height: 35px;
        font-size: 18px;
        top: 3px;
        right: 3px;
    }
    
    .omikuji-result {
        padding: 18px 15px;
        margin: 0 5px;
        border-width: 3px;
    }
    
    .omikuji-result-title {
        font-size: 1.5em;
    }
    
    .omikuji-result-content {
        font-size: 0.85em;
        line-height: 1.7;
    }
    
    .omikuji-result-content > div {
        margin: 6px 0;
    }
}
