.dungeon-view-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    background: radial-gradient(circle at center, #1a1a2e 0%, #0d0d15 100%);
    padding: 20px;
    box-sizing: border-box;
}

.dungeon-bg-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(circle at 20% 30%, rgba(0, 210, 255, 0.05) 0%, transparent 40%),
        radial-gradient(circle at 80% 70%, rgba(178, 69, 146, 0.05) 0%, transparent 40%);
    pointer-events: none;
    z-index: 1;
}

.dungeon-content {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 900px;
    display: flex;
    flex-direction: column;
    gap: 30px;
    background: rgba(25, 25, 35, 0.8);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 40px;
    box-shadow: var(--shadow-heavy);
}

.dungeon-header {
    text-align: center;
}

.dungeon-main-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin: 0;
    background: linear-gradient(135deg, #fff 0%, #aaa 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.dungeon-depth-badge {
    display: inline-block;
    margin-top: 10px;
    padding: 4px 12px;
    background: rgba(255, 215, 0, 0.1);
    border: 1px solid rgba(255, 215, 0, 0.3);
    color: var(--gold);
    border-radius: 1000px;
    font-size: 0.85rem;
    font-weight: 600;
}

/* Map Containers */
.dungeon-map-container {
    padding: 20px 0;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.dungeon-path-container {
    display: flex;
    flex-direction: column;
    gap: 30px;
    align-items: center;
    width: 100%;
}

.path-row {
    display: flex;
    align-items: center;
    gap: 15px;
    justify-content: center;
}

.path-row.row-reverse {
    flex-direction: row-reverse;
}

/* Nodes */
.dungeon-node {
    position: relative;
    width: 80px;
    height: 100px;
    cursor: pointer;
    transition: all var(--transition-normal);
}

.node-inner {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s;
}

.node-icon {
    font-size: 2rem;
    filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.5));
}

.node-content {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.node-label {
    font-size: 0.7rem;
    font-weight: 800;
    color: #fff;
    text-transform: uppercase;
}

.node-status {
    font-size: 0.5rem;
    color: #666;
    letter-spacing: 1px;
}

/* Connectors */
.path-connector {
    width: 60px;
    height: 4px;
    background: #444;
    border-radius: 2px;
}

.path-connector.status-available,
.path-connector.status-completed {
    background: var(--gold-gradient);
}

.path-turn {
    width: 4px;
    height: 30px;
    background: #444;
    margin: -15px 0;
}

.path-turn.status-available,
.path-turn.status-completed {
    background: var(--gold-gradient);
}

/* Node States */
.dungeon-node.status-available .node-inner {
    border-color: var(--gold);
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.2);
}

.dungeon-node.status-completed {
    opacity: 0.6;
}

.dungeon-node.status-locked {
    opacity: 0.3;
    pointer-events: none;
}

.dungeon-node:hover .node-inner {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.1);
}

/* Progress */
.dungeon-progress {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
}

.progress-info {
    display: flex;
    justify-content: space-between;
}

.progress-label {
    font-size: 0.75rem;
    font-weight: 800;
    color: #666;
}

.track {
    height: 8px;
    background: #111;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.progress-fill-main {
    height: 100%;
    background: var(--gold-gradient);
    transition: width var(--transition-slow);
}

.btn-abandon {
    background: rgba(244, 67, 54, 0.1);
    border: 1px solid var(--danger);
    padding: 10px 20px;
    border-radius: 8px;
    color: #f44336;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-abandon:hover {
    background: var(--danger);
    color: #fff;
}

/* Adventure View */
.adventure-view-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    background: radial-gradient(circle at center, #1a1a2e 0%, #080810 100%);
    padding: 2rem;
    box-sizing: border-box;
}

.adventure-header {
    text-align: center;
    margin-bottom: 2rem;
}

.adventure-header h2 {
    font-size: 2.5rem;
    margin: 0;
    color: var(--gold);
    text-shadow: 0 0 15px rgba(255, 215, 0, 0.3);
}

.adventure-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    max-width: 800px;
    margin: 0 auto;
    width: 100%;
}

.adventure-image-container {
    width: 100%;
    height: 350px;
    background: rgba(0, 0, 0, 0.4);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
}

.adventure-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s ease;
}

.adventure-image-container.img-failed {
    background: linear-gradient(135deg, #1a1a2e 0%, #0d0d15 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.adventure-image-container.img-failed::after {
    content: "❔";
    font-size: 5rem;
    opacity: 0.2;
}

.adventure-text-box {
    background: rgba(25, 25, 35, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 2rem;
    width: 100%;
    box-sizing: border-box;
}

#adventure-desc {
    font-size: 1.1rem;
    line-height: 1.6;
    color: #ddd;
    margin-bottom: 2rem;
}

.choice-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.choice-container .btn {
    padding: 1rem;
    font-size: 1rem;
    text-align: left;
    transition: all 0.2s;
}

.event-choice {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.choice-main-row,
.choice-outcomes {
    display: flex;
    justify-content: space-between;
    gap: 16px;
}

.choice-label {
    color: #f2f2f2;
    font-weight: 700;
}

.choice-label small,
.choice-check {
    color: #9898a8;
    font-size: 0.78rem;
    font-weight: 500;
}

.choice-chance {
    color: var(--gold);
    font-weight: 800;
}

.choice-outcomes {
    font-size: 0.76rem;
}

.choice-reward {
    color: #72d88b;
}

.choice-risk {
    color: #e87979;
    text-align: right;
}

@media (max-width: 700px) {
    .choice-outcomes {
        flex-direction: column;
        gap: 3px;
    }

    .choice-risk {
        text-align: left;
    }
}

/* Scene Transitions */
.scene-transition {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    z-index: 9999;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.scene-transition.active {
    opacity: 1;
    pointer-events: all;
}

/* Loader Styles */
.loader-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.loader-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(255, 215, 0, 0.1);
    border-top: 4px solid var(--gold);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.2);
}

.loader-text {
    color: var(--gold);
    font-size: 1.2rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 4px;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@keyframes pulse {

    0%,
    100% {
        opacity: 0.5;
        transform: scale(0.95);
    }

    50% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.screen-fade-in {
    animation: fadeIn 0.5s ease forwards;
}
