:root {
    --primary-gold: #d4af37;
    --dark-bg: #0a0a0a;
    --text-white: #f5f5f5;
    --accent-gold: #ffdf00;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Inter', 'Noto Sans JP', sans-serif;
    background: url('image/bg.jpg') no-repeat center center fixed;
    background-size: cover;
    color: var(--text-white);
    overflow-y: auto;
    overflow-x: hidden;
    min-height: 100vh;
}

/* Hero Section (First View) */
#hero-section {
    width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    box-sizing: border-box;
}

#intro-section {
    background: rgba(0, 0, 0, 0.6);
    padding: 1rem 1.5rem;
    border-radius: 15px;
    margin-bottom: 10px;
    width: 90%;
    max-width: 600px;
    z-index: 50;
    backdrop-filter: blur(5px);
    text-align: center;
}

.banner-container {
    width: 100%;
    margin-bottom: 0.5rem;
}

.site-banner {
    max-width: 100%;
    height: auto;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.5));
    border-radius: 15px;
}

.tagline {
    color: #eee;
    font-weight: bold;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.8);
    margin: 0.5rem 0 1.5rem;
}

#race-container {
    position: relative;
    width: 100%;
    height: 60vh;
    max-height: 500px;
    overflow: hidden;
    background: transparent;
    border-bottom: 2px solid rgba(212, 175, 55, 0.3);
}

/* Horse & Animation */
.horse {
    position: absolute;
    bottom: 10px;
    width: 120px;
    height: 90px;
    z-index: 10;
    transition: left 0.1s linear;
}

.horse img {
    width: 100%;
    height: 100%;
    animation: gallop 0.4s ease-in-out infinite;
}

@keyframes gallop {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }

    50% {
        transform: translateY(-8px) rotate(-2deg);
    }
}

.horse-body {
    width: 100%;
    height: 100%;
}

.horse-menu {
    position: absolute;
    right: 130px;
    top: 50%;
    transform: translateY(-50%) translateX(20px);
    background: var(--primary-gold);
    color: #000;
    text-decoration: none;
    padding: 8px 15px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 14px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    border: 2px solid #fff;
    z-index: 20;
}

.horse-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(-50%) translateX(0);
}

.horse-menu:hover {
    background: var(--accent-gold);
    transform: translateY(-50%) scale(1.1);
}

/* UI Elements */
/* Modal Overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
    z-index: 2000;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Modal Content */
.modal-content {
    background: rgba(20, 20, 20, 0.95);
    border: 2px solid var(--primary-gold);
    border-radius: 25px;
    padding: 2rem;
    max-width: 600px;
    width: 90%;
    position: relative;
    box-shadow: 0 0 50px rgba(212, 175, 55, 0.3);
    color: var(--text-white);
}

/* Fluffy Animation Logic */
.modal-overlay.active .modal-content {
    animation: fluffyIn 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes fluffyIn {
    0% {
        opacity: 0;
        transform: scale(0.5) translateY(100px);
    }

    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    color: var(--primary-gold);
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
}

.modal-body h2 {
    color: var(--primary-gold);
    border-bottom: 2px solid var(--primary-gold);
    padding-bottom: 10px;
}

.modal-body p {
    line-height: 1.8;
}

/* Results List */
.results-list {
    list-style: none;
    padding: 0;
}

.results-list li {
    padding: 10px;
    border-bottom: 1px solid rgba(212, 175, 55, 0.2);
    font-size: 1.1rem;
}

.results-list li strong {
    color: var(--primary-gold);
}

/* Footer Nav */
.footer-nav {
    margin-bottom: 25px;
}

.footer-nav a {
    color: var(--primary-gold);
    text-decoration: none;
    margin: 0 15px;
    font-weight: bold;
    transition: color 0.3s;
}

.footer-nav a:hover {
    color: var(--accent-gold);
}

/* Modal Content Adjustments */
.modal-content {
    background: rgba(20, 20, 20, 0.98);
    border: 2px solid var(--primary-gold);
    border-radius: 25px;
    padding: 2.5rem;
    max-width: 700px;
    width: 90%;
    max-height: 85vh;
    /* 画面からはみ出さないように */
    overflow-y: auto;
    /* 長い場合はスクロール */
    position: relative;
    box-shadow: 0 0 50px rgba(212, 175, 55, 0.3);
    color: var(--text-white);
}

/* Omikuji Section */
.omikuji-area {
    width: 100%;
    max-width: 800px;
    margin: 40px auto;
    padding: 0 20px;
    box-sizing: border-box;
}

.omikuji-card {
    background: rgba(0, 0, 0, 0.6);
    /* 動画が見えるように少し透過度を上げる */
    backdrop-filter: blur(5px);
    border: 2px solid var(--primary-gold);
    border-radius: 20px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 0 30px rgba(212, 175, 55, 0.2);
    transition: all 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.omikuji-bg-video {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: translate(-50%, -50%);
    z-index: -1;
    opacity: 0.4;
    /* 雰囲気を出しつつ文字の邪魔をしない程度に */
}

.omikuji-card.result-active {
    background: linear-gradient(135deg, rgba(20, 20, 20, 0.95), rgba(60, 45, 10, 0.95));
    /* 黄金の輝きをイメージ */
    box-shadow: 0 0 60px rgba(212, 175, 55, 0.5);
    border-color: var(--accent-gold);
}

/* 運試し！の瞬間のフラッシュ効果 */
.omikuji-flash {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: white;
    opacity: 0;
    pointer-events: none;
    z-index: 10;
}

.omikuji-flash.active {
    animation: flashEffect 0.5s ease-out;
}

@keyframes flashEffect {
    0% {
        opacity: 0.8;
    }

    100% {
        opacity: 0;
    }
}

.omikuji-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin: 20px 0;
    flex-wrap: wrap;
}

.control-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.control-group label {
    font-weight: bold;
    color: var(--primary-gold);
}

.control-group select,
.control-group input {
    background: rgba(0, 0, 0, 0.6);
    /* 少し濃いめで文字をはっきり */
    border: 1px solid var(--primary-gold);
    color: #fff;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 1rem;
    outline: none;
    cursor: pointer;
}

.control-group select option {
    background: #0a0a0a;
    /* ドロップダウン背景 */
    color: #fff;
    /* 文字色 */
}

.omikuji-btn {
    background: linear-gradient(135deg, var(--accent-gold), var(--primary-gold));
    color: #000;
    border: none;
    padding: 10px 25px;
    font-weight: bold;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1.1rem;
    transition: all 0.3s;
}

.omikuji-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 15px var(--accent-gold);
}

.omikuji-result-box {
    margin-top: 30px;
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--accent-gold);
    text-shadow: 0 0 15px rgba(255, 223, 0, 0.5);
}

.omikuji-link {
    color: var(--primary-gold);
    text-decoration: underline;
    font-size: 0.9rem;
    transition: color 0.3s;
}

.omikuji-link:hover {
    color: var(--accent-gold);
}

.fluffy-text {
    animation: fluffyIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.placeholder-text {
    font-size: 1rem;
    color: #666;
    font-style: italic;
}

.start-btn {
    background: var(--primary-gold);
    color: black;
    border: none;
    padding: 1rem 2rem;
    font-size: 1.2rem;
    cursor: pointer;
    font-weight: bold;
    border-radius: 5px;
    transition: transform 0.2s;
}

.start-btn:hover {
    transform: scale(1.05);
    background: var(--accent-gold);
}

.message {
    margin-top: 1rem;
    font-style: italic;
    color: #888;
}

/* Content Area */
.main-content {
    width: 100%;
    max-width: 1200px;
    margin: 60px auto;
    padding: 0 20px;
    box-sizing: border-box;
}

.content-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
}

.card {
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6);
}

.card h2 {
    font-size: 1.6rem;
    margin-top: 0;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--primary-gold);
    padding-bottom: 12px;
    font-weight: bold;
}

.gold-text {
    display: block;
    font-size: 0.8rem;
    color: var(--primary-gold);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 4px;
}

.card p {
    line-height: 1.8;
    color: #ddd;
    font-size: 1.05rem;
}

/* News */
.news-list {
    list-style: none;
    padding: 0;
}

.news-list li {
    padding: 14px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 1rem;
}

.news-list .date {
    color: var(--primary-gold);
    font-weight: bold;
    margin-right: 12px;
}

/* Link Banners */
.banner-link {
    display: block;
    width: 100%;
    padding: 20px;
    margin-bottom: 15px;
    text-align: center;
    background: rgba(212, 175, 55, 0.1);
    border: 1px solid rgba(212, 175, 55, 0.4);
    color: #fff;
    text-decoration: none;
    border-radius: 12px;
    font-weight: bold;
    box-sizing: border-box;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.banner-link.gold {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.3), rgba(212, 175, 55, 0.1));
    border: 1px solid var(--primary-gold);
}

.banner-link:hover {
    transform: translateY(-5px);
    background: rgba(212, 175, 55, 0.2);
    border-color: var(--accent-gold);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4);
}

/* Footer */
.main-footer {
    background: rgba(0, 0, 0, 0.95);
    padding: 60px 0;
    margin-top: 80px;
    border-top: 2px solid var(--primary-gold);
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    text-align: center;
}

.caution {
    font-size: 0.8rem;
    color: #999;
    max-width: 900px;
    margin: 0 auto 30px;
    line-height: 1.8;
}

.copyright {
    color: #666;
    font-size: 0.75rem;
    letter-spacing: 1px;
}

/* Responsiveness */
@media (max-width: 1024px) {
    .content-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .tagline {
        font-size: 0.9rem;
    }

    #race-container {
        height: 70vh;
    }

    .horse {
        width: 80px;
        height: 60px;
    }

    .horse-menu {
        right: 85px !important;
        padding: 6px 10px !important;
        font-size: 12px !important;
    }

    .card h2 {
        font-size: 1.3rem;
    }

    .card p {
        font-size: 0.95rem;
    }
}