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

body {
    overflow: hidden;
    background: #0a0a0a;
    font-family: 'Crimson Pro', serif;
}

#scene-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

#scene-container canvas {
    display: block;
}

#ui-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10;
}

#title-area {
    position: absolute;
    top: 20px;
    left: 0;
    right: 0;
    text-align: center;
}

#title-area h1 {
    font-family: 'Pirata One', cursive;
    font-size: clamp(1.8rem, 5vw, 3.2rem);
    color: #fff;
    text-shadow:
        0 0 10px rgba(0,0,0,0.9),
        0 2px 8px rgba(0,0,0,0.8),
        0 0 40px rgba(218, 165, 32, 0.3);
    letter-spacing: 2px;
    margin-bottom: 4px;
}

#title-area .subtitle {
    font-family: 'Crimson Pro', serif;
    font-style: italic;
    font-weight: 300;
    font-size: clamp(0.85rem, 2vw, 1.15rem);
    color: rgba(255, 255, 255, 0.75);
    text-shadow: 0 2px 6px rgba(0,0,0,0.8);
}

#controls-area {
    position: absolute;
    top: 110px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: auto;
}

@media (max-width: 600px) {
    #controls-area {
        top: auto;
        bottom: 90px;
        right: 10px;
        left: 10px;
        flex-direction: row;
        justify-content: center;
    }
}

.pirate-btn {
    font-family: 'Pirata One', cursive;
    font-size: 0.95rem;
    padding: 10px 18px;
    background: rgba(20, 12, 5, 0.85);
    color: #daa520;
    border: 2px solid #8b6914;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.25s ease;
    backdrop-filter: blur(8px);
    white-space: nowrap;
    letter-spacing: 0.5px;
}

.pirate-btn:hover {
    background: rgba(40, 25, 10, 0.95);
    border-color: #daa520;
    color: #ffd700;
    box-shadow: 0 0 15px rgba(218, 165, 32, 0.4);
    transform: translateY(-1px);
}

.pirate-btn:active {
    transform: translateY(1px);
}

.pirate-btn.active {
    background: rgba(218, 165, 32, 0.2);
    border-color: #ffd700;
    box-shadow: 0 0 12px rgba(218, 165, 32, 0.3);
}

#hint-bar {
    position: absolute;
    bottom: 50px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(10, 5, 0, 0.7);
    color: rgba(255, 255, 255, 0.65);
    padding: 8px 22px;
    border-radius: 20px;
    font-size: 0.82rem;
    font-style: italic;
    backdrop-filter: blur(6px);
    border: 1px solid rgba(218, 165, 32, 0.15);
    white-space: nowrap;
}

@media (max-width: 600px) {
    #hint-bar {
        font-size: 0.7rem;
        padding: 6px 14px;
        bottom: 55px;
        white-space: normal;
        text-align: center;
        max-width: 90%;
    }
}

#footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 10;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    background: rgba(10, 5, 0, 0.6);
    backdrop-filter: blur(6px);
    border-top: 1px solid rgba(218, 165, 32, 0.15);
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.45);
}

#footer a {
    color: #daa520;
    text-decoration: none;
    font-family: 'Pirata One', cursive;
    font-size: 0.9rem;
    transition: color 0.2s;
}

#footer a:hover {
    color: #ffd700;
    text-shadow: 0 0 8px rgba(218, 165, 32, 0.5);
}

@media (max-width: 600px) {
    #footer {
        flex-direction: column;
        gap: 4px;
        text-align: center;
        padding: 8px 14px;
    }
}