:root {
    --shrine-red: #dc143c;
    --shrine-dark-red: #8b0000;
    --shrine-gold: #ffd700;
    --paper-white: #faf8f3;
    --text-dark: #2c2c2c;
    --shadow: rgba(0, 0, 0, 0.1);
    --sakura-pink: #ffb7c5;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Hiragino Sans', 'Meiryo', sans-serif;
    background: linear-gradient(to bottom, #87ceeb 0%, #f0e68c 100%);
    min-height: 100vh;
    color: var(--text-dark);
    overflow-x: hidden;
}

#app {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* 桜吹雪アニメーション */
.sakura-container {
    position: fixed;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.sakura-petal {
    position: absolute;
    width: 10px;
    height: 10px;
    background: var(--sakura-pink);
    border-radius: 50% 0;
    opacity: 0.8;
    animation: fall linear infinite;
}

@keyframes fall {
    to {
        transform: translateY(100vh) rotate(360deg);
    }
}

/* メインコンテナ */
.shrine-container {
    flex: 1;
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
    position: relative;
    z-index: 2;
}

/* ヘッダー */
header {
    text-align: center;
    margin-bottom: 3rem;
}

.shrine-title {
    font-size: 2.5rem;
    color: var(--shrine-red);
    text-shadow: 2px 2px 4px var(--shadow);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.torii {
    font-size: 3rem;
    filter: drop-shadow(2px 2px 4px var(--shadow));
}

/* 言語切り替え */
.language-toggle {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    margin-top: 1rem;
}

.lang-btn {
    padding: 0.5rem 1rem;
    border: 2px solid var(--shrine-red);
    background: white;
    color: var(--shrine-red);
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: bold;
}

.lang-btn:hover,
.lang-btn.active {
    background: var(--shrine-red);
    color: white;
}

/* おみくじボックス */
.omikuji-box {
    background: var(--paper-white);
    border-radius: 10px;
    padding: 3rem;
    box-shadow: 0 10px 30px var(--shadow);
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
}

.omikuji-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 10px;
    background: repeating-linear-gradient(
        90deg,
        var(--shrine-red) 0,
        var(--shrine-red) 20px,
        white 20px,
        white 40px
    );
}

.omikuji-container {
    text-align: center;
    position: relative;
}

.omikuji-stick {
    margin: 0 auto 2rem;
    width: 200px;
    height: 150px;
    position: relative;
}

.stick {
    width: 8px;
    height: 120px;
    background: linear-gradient(to bottom, #d2691e, #8b4513);
    margin: 0 auto;
    border-radius: 4px;
    box-shadow: 2px 2px 5px var(--shadow);
    transform-origin: center bottom;
    transition: transform 0.5s ease;
}

.stick.shake {
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-10deg); }
    75% { transform: rotate(10deg); }
}

.draw-button {
    background: var(--shrine-red);
    color: white;
    border: none;
    padding: 1rem 3rem;
    font-size: 1.2rem;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px var(--shadow);
    font-weight: bold;
}

.draw-button:hover {
    background: var(--shrine-dark-red);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px var(--shadow);
}

.draw-button:active {
    transform: translateY(0);
}

/* 結果表示 */
.result-container {
    margin-bottom: 2rem;
    animation: fadeIn 0.5s ease-in;
}

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

.fortune-paper {
    background: var(--paper-white);
    border: 3px solid var(--shrine-red);
    border-radius: 10px;
    padding: 2rem;
    box-shadow: 0 10px 30px var(--shadow);
    position: relative;
}

.fortune-paper::before,
.fortune-paper::after {
    content: '';
    position: absolute;
    width: 30px;
    height: 30px;
    background: var(--shrine-red);
    border-radius: 50%;
}

.fortune-paper::before {
    top: -15px;
    left: 50px;
}

.fortune-paper::after {
    top: -15px;
    right: 50px;
}

.fortune-title {
    font-size: 3rem;
    color: var(--shrine-red);
    text-align: center;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px var(--shadow);
}

.fortune-main {
    font-size: 1.2rem;
    text-align: center;
    margin-bottom: 2rem;
    line-height: 1.8;
}

.fortune-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 10px;
}

.detail-item {
    text-align: center;
}

.detail-label {
    display: block;
    font-weight: bold;
    color: var(--shrine-dark-red);
    margin-bottom: 0.5rem;
}

.detail-value {
    display: block;
    font-size: 1.1rem;
}

.fortune-advice {
    text-align: center;
    font-style: italic;
    color: var(--shrine-dark-red);
    line-height: 1.6;
    padding: 1rem;
    border-top: 2px dashed var(--shrine-red);
    margin-top: 1rem;
}

.share-button {
    display: block;
    margin: 2rem auto 0;
    background: var(--shrine-gold);
    color: var(--text-dark);
    border: none;
    padding: 0.8rem 2rem;
    font-size: 1rem;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: bold;
}

.share-button:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px var(--shadow);
}

/* 統計情報 */
.stats-container {
    background: var(--paper-white);
    border-radius: 10px;
    padding: 2rem;
    box-shadow: 0 5px 20px var(--shadow);
}

.stats-container h3 {
    text-align: center;
    color: var(--shrine-red);
    margin-bottom: 1.5rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 1rem;
    text-align: center;
}

.stat-item {
    padding: 1rem;
    background: white;
    border-radius: 10px;
    border: 2px solid var(--shrine-red);
}

.stat-label {
    display: block;
    font-weight: bold;
    color: var(--shrine-red);
    margin-bottom: 0.5rem;
}

.stat-value {
    display: block;
    font-size: 1.5rem;
    color: var(--text-dark);
}

/* フッター */
footer {
    text-align: center;
    padding: 2rem;
    color: #666;
}

/* レスポンシブ */
@media (max-width: 600px) {
    .shrine-container {
        padding: 1rem;
    }
    
    .shrine-title {
        font-size: 2rem;
    }
    
    .torii {
        font-size: 2.5rem;
    }
    
    .fortune-title {
        font-size: 2.5rem;
    }
    
    .omikuji-box {
        padding: 2rem 1rem;
    }
    
    .fortune-details {
        grid-template-columns: repeat(2, 1fr);
    }
}