@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;600;700&family=Philosopher:wght@400;700&display=swap');

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

body {
    font-family: 'Philosopher', sans-serif;
    background: linear-gradient(135deg, #2e7d32 0%, #388e3c 50%, #4caf50 100%);
    color: #f1f8e9;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 20% 20%, rgba(241, 248, 233, 0.1) 0%, transparent 40%),
        radial-gradient(circle at 80% 80%, rgba(76, 175, 80, 0.08) 0%, transparent 35%);
    pointer-events: none;
    z-index: 1;
}

.dice-sanctum {
    position: relative;
    z-index: 2;
    min-height: 100vh;
}

/* Header Styles */
.sacred-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: linear-gradient(135deg, rgba(46, 125, 50, 0.95), rgba(56, 142, 60, 0.95));
    backdrop-filter: blur(15px);
    border-bottom: 3px solid #f1f8e9;
    padding: 1rem 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.header-altar {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
}

.bone-return {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    color: #f1f8e9;
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    padding: 0.8rem 1.5rem;
    border: 2px solid transparent;
    border-radius: 10px;
    background: rgba(241, 248, 233, 0.1);
}

.bone-return:hover {
    color: #c8e6c9;
    border-color: #f1f8e9;
    background: rgba(241, 248, 233, 0.2);
    transform: translateX(-5px);
    box-shadow: 0 0 20px rgba(241, 248, 233, 0.3);
}

.return-die {
    font-size: 1.5rem;
    font-weight: bold;
    animation: dieRoll 2s ease-in-out infinite;
}

@keyframes dieRoll {
    0%, 100% { transform: translateX(0) rotate(0deg); }
    50% { transform: translateX(-5px) rotate(45deg); }
}

.craps-shrine {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    text-align: center;
}

.shrine-die, .shrine-bones {
    font-size: 2.5rem;
    color: #f1f8e9;
    animation: shrineShake 3s ease-in-out infinite alternate;
}

.shrine-bones {
    animation-delay: 1.5s;
}

@keyframes shrineShake {
    0% { text-shadow: 0 0 10px rgba(241, 248, 233, 0.5); transform: scale(1) rotate(0deg); }
    100% { text-shadow: 0 0 30px rgba(241, 248, 233, 1); transform: scale(1.1) rotate(10deg); }
}

.craps-shrine h1 {
    font-family: 'Cinzel', serif;
    font-size: 2.8rem;
    font-weight: 700;
    color: #f1f8e9;
    text-shadow:
        3px 3px 0px rgba(0, 0, 0, 0.5),
        0 0 20px rgba(241, 248, 233, 0.8);
    letter-spacing: 2px;
}

.ritual-status {
    display: flex;
    gap: 2rem;
}

.status-roll {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    background: linear-gradient(135deg, rgba(241, 248, 233, 0.2), rgba(76, 175, 80, 0.1));
    padding: 1rem 1.5rem;
    border-radius: 15px;
    border: 2px solid rgba(241, 248, 233, 0.5);
    font-size: 1.2rem;
    font-weight: 600;
}

.roll-icon {
    font-size: 1.5rem;
    animation: rollFloat 2s ease-in-out infinite;
}

@keyframes rollFloat {
    0%, 100% { transform: scale(1) rotate(0deg); }
    50% { transform: scale(1.2) rotate(90deg); }
}

/* Main Dice Hall */
.dice-hall {
    max-width: 1400px;
    margin: 0 auto;
    padding: 3rem 2rem;
}

.ritual-table {
    background: linear-gradient(135deg, #1b5e20 0%, #2e7d32 50%, #388e3c 100%);
    border-radius: 25px;
    padding: 3rem;
    border: 5px solid #f1f8e9;
    box-shadow:
        0 0 50px rgba(241, 248, 233, 0.3),
        inset 0 0 30px rgba(0, 0, 0, 0.5);
    position: relative;
    overflow: hidden;
}

.ritual-table::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(from 0deg, transparent, rgba(241, 248, 233, 0.05), transparent);
    animation: tableRotate 25s linear infinite;
    pointer-events: none;
}

@keyframes tableRotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.bone-decorations {
    position: absolute;
    top: -2rem;
    left: -2rem;
    right: -2rem;
    bottom: -2rem;
    pointer-events: none;
    color: #f1f8e9;
    font-size: 1.5rem;
    opacity: 0.7;
}

.deco-top {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    font-size: 2rem;
    animation: decoFloat 4s ease-in-out infinite;
}

.deco-sides {
    position: absolute;
    top: 50%;
    width: 100%;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
}

.side-bone {
    font-size: 2.5rem;
    animation: boneShine 3s ease-in-out infinite alternate;
}

.side-bone:last-child {
    animation-delay: 1.5s;
}

.deco-bottom {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    font-size: 2rem;
    animation: decoFloat 4s ease-in-out infinite reverse;
}

@keyframes decoFloat {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(-10px); }
}

@keyframes boneShine {
    0% { text-shadow: 0 0 10px rgba(241, 248, 233, 0.5); }
    100% { text-shadow: 0 0 30px rgba(241, 248, 233, 1); }
}

/* Fortune Frame */
.fortune-frame {
    position: relative;
    width: 100%;
    height: 600px;
    background: linear-gradient(135deg, #000 0%, #2e7d32 50%, #000 100%);
    border: 4px solid #f1f8e9;
    border-radius: 20px;
    margin: 2rem 0;
    overflow: hidden;
    box-shadow:
        inset 0 0 30px rgba(241, 248, 233, 0.2),
        0 0 20px rgba(0, 0, 0, 0.8);
    z-index: 2;
}

.craps-iframe {
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 16px;
}

/* Dice Wisdom */
.dice-wisdom {
    position: relative;
    z-index: 2;
    margin-top: 2rem;
}

.wisdom-bones {
    text-align: center;
    background: linear-gradient(135deg, rgba(241, 248, 233, 0.2), rgba(76, 175, 80, 0.1));
    padding: 2rem;
    border-radius: 20px;
    border: 3px solid #f1f8e9;
    position: relative;
}

.wisdom-bones::before {
    content: '🎲';
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #1b5e20, #2e7d32);
    padding: 0 1rem;
    font-size: 2rem;
    color: #f1f8e9;
}

.wisdom-bones h3 {
    font-family: 'Cinzel', serif;
    font-size: 2rem;
    color: #f1f8e9;
    margin-bottom: 1rem;
    text-shadow: 0 0 15px rgba(241, 248, 233, 0.8);
}

.wisdom-bones p {
    font-size: 1.2rem;
    color: #c8e6c9;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.ritual-features {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.bone-feature {
    background: linear-gradient(135deg, #4caf50, #66bb6a);
    color: #fff;
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 600;
    border: 2px solid #f1f8e9;
    transition: all 0.3s ease;
    font-family: 'Cinzel', serif;
    box-shadow: 0 0 10px rgba(76, 175, 80, 0.3);
}

.bone-feature:hover {
    background: linear-gradient(135deg, #66bb6a, #81c784);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(76, 175, 80, 0.4);
}

/* Footer */
.dice-footer {
    background: linear-gradient(135deg, #2e7d32, #4caf50);
    color: #f1f8e9;
    padding: 2rem;
    text-align: center;
    border-top: 3px solid #f1f8e9;
    margin-top: 3rem;
}

.footer-dice {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 1rem;
    font-size: 2rem;
    animation: diceDance 6s ease-in-out infinite;
}

@keyframes diceDance {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    33% { transform: translateY(-5px) rotate(120deg); }
    66% { transform: translateY(5px) rotate(240deg); }
}

.footer-incantation {
    font-style: italic;
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    color: #c8e6c9;
    text-shadow: 0 0 10px rgba(241, 248, 233, 0.5);
}

.footer-rituals {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.footer-rituals a {
    color: #f1f8e9;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-weight: 600;
    border: 2px solid transparent;
}

.footer-rituals a:hover {
    color: #c8e6c9;
    background: rgba(241, 248, 233, 0.2);
    border-color: #f1f8e9;
    text-shadow: 0 0 10px rgba(241, 248, 233, 0.8);
}

.age-disclaimer {
    color: #ff6b6b;
    font-size: 1rem;
    font-weight: 600;
    margin: 1rem auto;
    text-align: center;
    padding: 0.8rem;
    background: rgba(255, 107, 107, 0.1);
    border: 2px solid rgba(255, 107, 107, 0.3);
    border-radius: 8px;
    max-width: 600px;
}

/* Floating Dice */
.floating-dice {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.float-die {
    position: absolute;
    color: rgba(241, 248, 233, 0.4);
    font-size: 2rem;
    animation: diceFloat 18s linear infinite;
}

.float-die:nth-child(1) {
    left: 10%;
    animation-delay: 0s;
}

.float-die:nth-child(2) {
    left: 30%;
    animation-delay: 4s;
    color: rgba(76, 175, 80, 0.4);
}

.float-die:nth-child(3) {
    left: 60%;
    animation-delay: 8s;
    color: rgba(102, 187, 106, 0.4);
}

.float-die:nth-child(4) {
    left: 80%;
    animation-delay: 12s;
}

@keyframes diceFloat {
    0% {
        transform: translateY(100vh) rotate(0deg) scale(1);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    50% {
        transform: translateY(50vh) rotate(360deg) scale(1.2);
        opacity: 0.8;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-10vh) rotate(720deg) scale(0.8);
        opacity: 0;
    }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .dice-hall {
        padding: 2rem 1rem;
    }

    .ritual-table {
        padding: 2rem;
    }

    .fortune-frame {
        height: 500px;
    }
}

@media (max-width: 768px) {
    .header-altar {
        flex-direction: column;
        gap: 1rem;
        padding: 0 1rem;
    }

    .ritual-status {
        gap: 1rem;
    }

    .craps-shrine h1 {
        font-size: 2rem;
    }

    .ritual-table {
        padding: 1.5rem 1rem;
    }

    .fortune-frame {
        height: 400px;
        margin: 1rem 0;
    }

    .ritual-features {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }

    .bone-feature {
        width: 200px;
        text-align: center;
    }

    .footer-rituals {
        flex-direction: column;
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .fortune-frame {
        height: 350px;
    }

    .ritual-table {
        padding: 1rem;
    }

    .bone-decorations {
        font-size: 1.2rem;
    }
}
