@import url('https://fonts.googleapis.com/css2?family=MedievalSharp&family=Metamorphous&display=swap');

body {
    font-family: 'MedievalSharp', serif;
    /* background-color: #1c1917; */
    color: #fcd34d;
    overflow-x: hidden
}

.font-castle {
    font-family: 'Metamorphous', cursive
}

/* High-quality claymation background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('clay_background.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    z-index: -1;
}

.fortress-bg {
    /* Background properties removed in favor of body::before */
    min-height: 100vh;
    position: relative
}

.wall-container {
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100" fill="%2357534e"><rect width="100" height="100" fill="%2344403c"/><rect x="5" y="5" width="40" height="25" fill="%2357534e"/><rect x="55" y="5" width="40" height="25" fill="%2357534e"/><rect x="5" y="35" width="90" height="25" fill="%2357534e"/><rect x="5" y="65" width="40" height="25" fill="%2357534e"/><rect x="55" y="65" width="40" height="25" fill="%2357534e"/></svg>');
    background-size: 100px 100px;
    border-top: 10px solid #292524;
    min-height: 200px;
    display: flex;
    align-items: flex-end;
    justify-content: space-around;
    padding: 20px;
    position: relative;
    margin-top: 20px;
    box-shadow: 0 -10px 20px rgba(0, 0, 0, 0.5)
}

.battlement {
    width: 100%;
    height: 30px;
    background: repeating-linear-gradient(90deg, #292524, #292524 40px, transparent 40px, transparent 60px);
    position: absolute;
    top: -30px;
    left: 0
}

.shield {
    width: 100px;
    height: 120px;
    background: linear-gradient(135deg, #991b1b, #7f1d1d);
    border: 4px solid #fcd34d;
    border-radius: 10px 10px 50px 50px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
    cursor: grab;
    transition: transform 0.2s;
    position: relative;
    -webkit-user-select: none;
    user-select: none
}

.shield:active {
    cursor: grabbing;
    transform: scale(1.05)
}

.shield.placed {
    background: #15803d;
    border-color: #86efac
}

.shield-fraction {
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1
}

.frac-line {
    width: 80%;
    height: 2px;
    background: white;
    margin: 2px 0
}

.slot {
    width: 110px;
    height: 130px;
    border: 4px dashed #78350f;
    border-radius: 10px 10px 50px 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.2)
}

.banner {
    background: #b91c1c;
    color: #fcd34d;
    padding: 10px 40px;
    clip-path: polygon(0 0, 100% 0, 100% 80%, 50% 100%, 0 80%);
    text-align: center;
    font-family: 'Metamorphous';
    font-size: 1.5rem;
    position: absolute;
    top: 0;
    right: 20px;
    filter: drop-shadow(0 5px 5px rgba(0, 0, 0, 0.5))
}

.scroll-panel {
    background: #fef3c7;
    color: #451a03;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    border: 2px solid #edafb8;
    background-image: url("data:image/svg+xml,%3Csvg width='6' height='6' viewBox='0 0 6 6' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23d97706' fill-opacity='0.1' fill-rule='evenodd'%3E%3Cpath d='M5 0h1L0 6V5zM6 5v1H5z'/%3E%3C/g%3E%3C/svg%3E")
}

.btn-castle {
    background: #78350f;
    color: #feb2b2;
    border: 2px solid #b91c1c;
    padding: 10px 20px;
    font-family: 'Metamorphous';
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.1s
}

.btn-castle:hover {
    background: #991b1b;
    color: white;
    transform: scale(1.05)
}