* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-image: url('Hokage_Rock.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    color: #ffffff;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    height: 100vh;
    overflow: hidden;
}

#layout-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100vw;
    height: 100vh;
    padding: 20px;
    gap: 20px;
    background: rgba(0, 0, 0, 0.4); 
}

.glass-panel {
    background: rgba(10, 10, 10, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.85);
    border-radius: 14px;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.6), inset 0 0 15px rgba(255, 255, 255, 0.1);
    height: 100%;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
}

#left-panel {
    flex: 1;
    max-width: 400px;
    min-width: 320px;
}

#center-panel {
    flex: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
}

#right-panel {
    flex: 1;
    max-width: 350px;
    min-width: 300px;
}

.glass-panel::-webkit-scrollbar {
    width: 6px;
}
.glass-panel::-webkit-scrollbar-track {
    background: transparent;
}
.glass-panel::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.5);
    border-radius: 10px;
}

h1, h2, h3 {
    text-shadow: 0 0 12px rgba(255, 255, 255, 0.6);
    margin-bottom: 15px;
    text-align: center;
}

#main-title {
    font-size: 2.2rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    border-bottom: 2px solid rgba(255, 255, 255, 0.5);
    padding-bottom: 15px;
    margin-bottom: 20px;
    color: #ff6600;
    text-shadow: 0 0 10px rgba(255, 102, 0, 0.5);
}

#wheel-title {
    background: rgba(0, 0, 0, 0.85);
    padding: 12px 35px;
    border-radius: 30px;
    border: 2px solid rgba(255, 255, 255, 0.7);
    font-size: 1.8rem;
    margin-bottom: 30px;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.4);
}

.wheel-wrapper {
    position: relative;
    width: 550px;
    height: 550px;
    border-radius: 50%;
    box-shadow: 0 0 35px rgba(255, 255, 255, 0.5), 0 0 60px rgba(0, 0, 0, 0.8);
    background: rgba(0,0,0,0.6);
}

#wheel-canvas {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 6px solid rgba(255, 255, 255, 0.95);
}

.pointer {
    position: absolute;
    right: -25px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-top: 25px solid transparent;
    border-bottom: 25px solid transparent;
    border-right: 40px solid #ffffff;
    filter: drop-shadow(0 0 12px rgba(255, 255, 255, 0.95));
    z-index: 10;
}

.screen {
    display: none;
    flex-direction: column;
    animation: fadeIn 0.4s ease-in-out;
}

.screen.active {
    display: flex;
}

.hidden {
    display: none !important;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

button {
    background: rgba(20, 20, 20, 0.95);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.6);
    padding: 12px 15px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    margin-bottom: 10px;
    box-shadow: 0 0 5px rgba(255, 255, 255, 0.1);
}

button:hover:not(:disabled) {
    background: #ffffff;
    color: #000000;
    box-shadow: 0 0 18px rgba(255, 255, 255, 0.9);
    transform: translateY(-2px);
}

button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.button-group {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.result-text {
    margin: 15px 0;
    font-size: 1.1rem;
    font-weight: bold;
    text-align: center;
    color: #ffd700;
    text-shadow: 0 0 8px rgba(255, 215, 0, 0.6);
}

.stat-group {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    background: rgba(0, 0, 0, 0.6);
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.stat-group button {
    width: auto;
    margin: 0;
    padding: 8px 12px;
    font-size: 0.85rem;
}

.stat-result {
    font-weight: bold;
    color: #ffd700;
    font-size: 1rem;
    text-shadow: 0 0 5px rgba(255, 215, 0, 0.5);
}

.panel-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.4);
    padding-bottom: 10px;
    margin-bottom: 15px;
    text-align: left;
    color: #ff6600;
    text-shadow: 0 0 5px rgba(255, 102, 0, 0.3);
}

.profile-grid {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.profile-row {
    display: flex;
    justify-content: space-between;
    background: rgba(0, 0, 0, 0.6);
    padding: 8px 12px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    font-size: 0.9rem;
}

.profile-row span:first-child {
    color: rgba(255, 255, 255, 0.75);
    font-weight: bold;
}

.profile-row span:last-child {
    font-weight: bold;
    text-align: right;
}

.inventory-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.inventory-slot {
    aspect-ratio: 1;
    background: rgba(0, 0, 0, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    font-size: 0.8rem;
    text-align: center;
    padding: 5px;
    box-shadow: inset 0 0 10px rgba(255, 255, 255, 0.05);
}

.combat-stats-box {
    display: flex;
    justify-content: space-between;
    background: rgba(0, 0, 0, 0.7);
    padding: 15px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    margin-bottom: 15px;
}

#combat-log {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 0.95rem;
    line-height: 1.6;
    height: 160px;
    overflow-y: auto;
    background: rgba(5, 5, 5, 0.95);
    padding: 12px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    margin-bottom: 15px;
    text-align: left;
    box-shadow: inset 0 0 15px rgba(0,0,0,0.9);
}

#combat-log::-webkit-scrollbar {
    width: 6px;
}
#combat-log::-webkit-scrollbar-track {
    background: transparent;
}
#combat-log::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.4);
    border-radius: 5px;
}

.combat-items-row {
    display: flex;
    gap: 10px;
    margin-top: 10px;
    width: 100%;
}

.combat-items-row button {
    margin: 0;
    font-size: 0.85rem;
    padding: 10px;
}

#credits-btn {
    position: fixed;
    bottom: 30px;
    left: 30px;
    width: auto;
    max-width: 100px;
    padding: 8px 12px;
    font-size: 0.85rem;
    z-index: 999;
    background: rgba(10, 10, 10, 0.8);
    border-color: rgba(255, 255, 255, 0.4);
}

#start-boss-btn {
    border-color: #ff3333;
    animation: pulseRed 2s infinite;
}

#save-world-btn {
    border-color: #9b59b6;
    animation: pulsePurple 2s infinite;
}

@keyframes pulseRed {
    0% { box-shadow: 0 0 0 0 rgba(255, 51, 51, 0.7); }
    70% { box-shadow: 0 0 0 15px rgba(255, 51, 51, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 51, 51, 0); }
}

@keyframes pulsePurple {
    0% { box-shadow: 0 0 0 0 rgba(142, 68, 173, 0.7); }
    70% { box-shadow: 0 0 0 15px rgba(142, 68, 173, 0); }
    100% { box-shadow: 0 0 0 0 rgba(142, 68, 173, 0); }
}
