@keyframes goldDust {
    0% { transform: translateY(0) rotate(0deg); opacity: 0; }
    20% { opacity: 1; }
    100% { transform: translateY(-100vh) rotate(720deg); opacity: 0; }
}

@keyframes doorShimmer {
    0% { background-position: -200% center; }
    100% { background-position: 200% center; }
}

@keyframes goldPulse {
    0%, 100% { text-shadow: 0 0 10px rgba(255, 215, 0, 0.5); }
    50% { text-shadow: 0 0 30px rgba(255, 215, 0, 0.9), 0 0 60px rgba(255, 215, 0, 0.4); }
}

@keyframes screenShake {
    0%, 100% { transform: translate(0, 0); }
    10% { transform: translate(-8px, -6px); }
    20% { transform: translate(8px, 4px); }
    30% { transform: translate(-6px, 8px); }
    40% { transform: translate(6px, -4px); }
    50% { transform: translate(-4px, 6px); }
    60% { transform: translate(4px, -8px); }
    70% { transform: translate(-8px, 4px); }
    80% { transform: translate(6px, 6px); }
    90% { transform: translate(-4px, -6px); }
}

@keyframes skullAppear {
    0% { transform: scale(0) rotate(-180deg); opacity: 0; }
    60% { transform: scale(1.3) rotate(10deg); opacity: 1; }
    100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

@keyframes bounceIn {
    0% { transform: scale(0); opacity: 0; }
    50% { transform: scale(1.2); }
    70% { transform: scale(0.9); }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes goldCountUp {
    0% { transform: scale(1); color: #ffd700; }
    50% { transform: scale(1.15); color: #fff8dc; }
    100% { transform: scale(1); color: #ffd700; }
}

@keyframes flipDoor {
    0% { transform: rotateY(0deg); }
    100% { transform: rotateY(180deg); }
}

@keyframes fadeInRight {
    0% { opacity: 0; transform: translateX(40px); }
    100% { opacity: 1; transform: translateX(0); }
}

@keyframes glowPulse {
    0%, 100% { box-shadow: 0 0 10px rgba(255, 0, 0, 0.3); }
    50% { box-shadow: 0 0 30px rgba(255, 0, 0, 0.8), 0 0 60px rgba(255, 0, 0, 0.3); }
}

@keyframes oracleGlow {
    0%, 100% { text-shadow: 0 0 10px rgba(138, 43, 226, 0.5); }
    50% { text-shadow: 0 0 30px rgba(138, 43, 226, 0.9), 0 0 60px rgba(138, 43, 226, 0.4); }
}

@keyframes coinFlip {
    0% { transform: rotateX(0deg); }
    100% { transform: rotateX(1800deg); }
}

#golden-dungeon-modal {
    z-index: 1000;
}

#golden-dungeon-modal .modal-content {
    background: linear-gradient(145deg, #1a1209, #0d0a05, #1a1209);
    border: 2px solid #8b6914;
    box-shadow: 0 0 80px rgba(255, 215, 0, 0.15), inset 0 0 60px rgba(0, 0, 0, 0.5);
    border-radius: 24px;
    padding: 0;
    max-width: calc(700px * var(--ui-scale-modal-size));
    width: 95%;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
    color: #e8d5a3;
}

#golden-dungeon-modal .modal-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 0;
}

.gd-dust-particle {
    position: absolute;
    width: 3px;
    height: 3px;
    background: radial-gradient(circle, rgba(255, 215, 0, 0.8), transparent);
    border-radius: 50%;
    pointer-events: none;
    animation: goldDust linear infinite;
    z-index: 0;
}

.gd-header {
    padding: 20px 24px 0;
    position: relative;
    z-index: 1;
}

.gd-header h2 {
    margin: 0;
    color: #ffd700;
    font-size: 1.5em;
    text-align: center;
    animation: goldPulse 3s ease-in-out infinite;
    letter-spacing: 3px;
}

.gd-close-btn {
    position: absolute;
    top: 16px;
    right: 20px;
    font-size: calc(28px * var(--ui-scale-modal-body));
    color: #8b6914;
    cursor: pointer;
    background: none;
    border: none;
    transition: color 0.2s;
    z-index: 2;
}

.gd-close-btn:hover {
    color: #ffd700;
}

.gd-tabs {
    display: flex;
    justify-content: center;
    gap: 0;
    padding: 16px 24px 0;
    position: relative;
    z-index: 1;
}

.gd-tab {
    flex: 1;
    padding: 12px 20px;
    background: transparent;
    border: none;
    color: #6b5a3e;
    font-size: 0.95em;
    font-weight: bold;
    cursor: pointer;
    letter-spacing: 2px;
    text-transform: uppercase;
    transition: all 0.3s;
    border-bottom: 2px solid transparent;
}

.gd-tab.active {
    color: #ffd700;
    border-bottom: 2px solid #ffd700;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.gd-tab:hover:not(.active) {
    color: #c9a84c;
}

.gd-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px 24px 24px;
    position: relative;
    z-index: 1;
}

.gd-tab-content {
    display: none;
}

.gd-tab-content.active {
    display: block;
}

.gd-lobby {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.gd-info-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
    background: rgba(139, 105, 20, 0.15);
    border: 1px solid rgba(139, 105, 20, 0.3);
    border-radius: 12px;
}

.gd-info-item {
    text-align: center;
}

.gd-info-label {
    font-size: 0.75em;
    color: #8b7d5e;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.gd-info-value {
    font-size: 1.1em;
    color: #ffd700;
    font-weight: bold;
}

.gd-difficulty-cards {
    display: flex;
    gap: 12px;
}

.gd-diff-card {
    flex: 1;
    padding: 18px 14px;
    background: rgba(30, 22, 10, 0.8);
    border: 1px solid rgba(139, 105, 20, 0.3);
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
}

.gd-diff-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(255, 215, 0, 0.15);
    border-color: rgba(255, 215, 0, 0.5);
}

.gd-diff-card.selected {
    border-color: #ffd700;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.2), inset 0 0 20px rgba(255, 215, 0, 0.05);
}

.gd-diff-card.hell {
    border-color: rgba(180, 40, 40, 0.4);
}

.gd-diff-card.hell:hover {
    box-shadow: 0 8px 30px rgba(255, 0, 0, 0.15);
    border-color: rgba(255, 60, 60, 0.6);
}

.gd-diff-card.hell.selected {
    border-color: #e74c3c;
    box-shadow: 0 0 20px rgba(255, 0, 0, 0.3), inset 0 0 20px rgba(255, 0, 0, 0.05);
}

.gd-diff-icon {
    font-size: 2em;
    margin-bottom: 8px;
}

.gd-diff-name {
    font-size: 1.05em;
    font-weight: bold;
    color: #ffd700;
    margin-bottom: 6px;
}

.gd-diff-card.hell .gd-diff-name {
    color: #e74c3c;
}

.gd-diff-desc {
    font-size: 0.78em;
    color: #8b7d5e;
    line-height: 1.4;
    white-space: pre-line;
}

.gd-diff-rate {
    margin-top: 8px;
    font-size: 0.85em;
    font-weight: bold;
}

.gd-diff-cost {
    margin-top: 4px;
    font-size: 0.8em;
    color: #c9a84c;
}

.gd-enter-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #8b6914, #c9a84c, #8b6914);
    border: none;
    border-radius: 12px;
    color: #1a1209;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    letter-spacing: 2px;
    transition: all 0.3s;
    text-transform: uppercase;
}

.gd-enter-btn:hover {
    background: linear-gradient(135deg, #c9a84c, #ffd700, #c9a84c);
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.3);
}

.gd-enter-btn:disabled {
    background: #3a3020;
    color: #5a4a30;
    cursor: not-allowed;
    box-shadow: none;
}

.gd-game-view {
    display: none;
    flex-direction: column;
    gap: 16px;
    animation: fadeInRight 0.5s ease;
}

.gd-game-view.active {
    display: flex;
}

.gd-floor-header {
    text-align: center;
    padding: 10px;
}

.gd-floor-number {
    font-size: 2em;
    color: #ffd700;
    font-weight: bold;
    animation: goldPulse 2s ease-in-out infinite;
}

.gd-floor-label {
    font-size: 0.85em;
    color: #8b7d5e;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.gd-gold-display {
    display: flex;
    justify-content: space-around;
    padding: 12px;
    background: rgba(139, 105, 20, 0.1);
    border: 1px solid rgba(139, 105, 20, 0.2);
    border-radius: 12px;
}

.gd-gold-item {
    text-align: center;
}

.gd-gold-label {
    font-size: 0.75em;
    color: #8b7d5e;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 4px;
}

.gd-gold-value {
    font-size: 1.3em;
    font-weight: bold;
    font-family: 'Courier New', monospace;
}

.gd-gold-accumulated {
    color: #ffd700;
}

.gd-gold-safe {
    color: #2ecc71;
}

.gd-gold-animate {
    animation: goldCountUp 0.4s ease;
}

.gd-doors-container {
    display: flex;
    justify-content: center;
    gap: 16px;
    padding: 20px 0;
}

.gd-door {
    width: 100px;
    height: 140px;
    cursor: pointer;
    position: relative;
    perspective: 1000px;
}

.gd-door-inner {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.gd-door:hover:not(.flipped):not(.disabled) .gd-door-inner {
    transform: translateY(-8px);
}

.gd-door:hover:not(.flipped):not(.disabled) .gd-door-front {
    border-color: rgba(255, 215, 0, 0.7);
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.3);
}

.gd-door.flipped .gd-door-inner {
    transform: rotateY(180deg);
}

.gd-door.flipped {
    cursor: default;
}

.gd-door.disabled {
    cursor: default;
    opacity: 0.5;
}

.gd-door-front,
.gd-door-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.gd-door-front {
    background: linear-gradient(180deg, #2a1f0e, #1a1209);
    border: 2px solid rgba(139, 105, 20, 0.5);
    z-index: 1;
    overflow: hidden;
}

.gd-door-front::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 300%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 215, 0, 0.06), transparent);
    animation: doorShimmer 3s ease-in-out infinite;
    pointer-events: none;
}

.gd-door-question {
    font-size: 2.5em;
    color: #8b6914;
    z-index: 1;
}

.gd-door-back {
    transform: rotateY(180deg);
}

.gd-door-back.gold {
    background: linear-gradient(135deg, #8b6914, #ffd700, #c9a84c, #ffd700, #8b6914);
    border: 2px solid #ffd700;
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.4);
}

.gd-door-back.gold .gd-door-icon {
    font-size: 3em;
}

.gd-door-back.skull {
    background: linear-gradient(135deg, #3d0c0c, #5a1a1a, #3d0c0c);
    border: 2px solid #8b2020;
    box-shadow: 0 0 30px rgba(255, 0, 0, 0.3);
}

.gd-door-back.skull .gd-door-icon {
    font-size: 3em;
    animation: skullAppear 0.6s ease;
}

.gd-door.oracle-warn .gd-door-front {
    border-color: rgba(138, 43, 226, 0.7);
    box-shadow: 0 0 15px rgba(138, 43, 226, 0.4);
}

.gd-door.oracle-warn .gd-door-front::before {
    content: '⚠';
    position: absolute;
    top: 6px;
    right: 8px;
    font-size: 0.9em;
    animation: oracleGlow 1.5s ease-in-out infinite;
}

.gd-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.gd-action-btn {
    flex: 1;
    padding: 12px 16px;
    border: none;
    border-radius: 10px;
    font-weight: bold;
    font-size: 0.9em;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.gd-action-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.gd-btn-stop {
    background: linear-gradient(135deg, #2ecc71, #27ae60);
    color: #fff;
}

.gd-btn-stop:hover:not(:disabled) {
    box-shadow: 0 0 20px rgba(46, 204, 113, 0.4);
}

.gd-btn-continue {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: #fff;
}

.gd-btn-continue:hover:not(:disabled) {
    box-shadow: 0 0 20px rgba(52, 152, 219, 0.4);
}

.gd-death-overlay {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse at center, rgba(100, 0, 0, 0.92), rgba(0, 0, 0, 0.96));
    z-index: 10;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 24px;
    gap: 16px;
}

.gd-death-overlay.active {
    display: flex;
}

.gd-death-skull {
    font-size: 5em;
    animation: skullAppear 0.8s ease;
}

.gd-death-text {
    font-size: 1.8em;
    font-weight: bold;
    color: #e74c3c;
    animation: glowPulse 1.5s ease-in-out infinite;
}

.gd-death-info {
    text-align: center;
    color: #c0392b;
    font-size: 0.95em;
    line-height: 1.6;
}

.gd-death-safe {
    color: #2ecc71;
    font-weight: bold;
}

.gd-death-close-btn {
    margin-top: 10px;
    padding: 12px 40px;
    background: linear-gradient(135deg, #8b6914, #c9a84c);
    border: none;
    border-radius: 10px;
    color: #1a1209;
    font-weight: bold;
    font-size: 1em;
    cursor: pointer;
    transition: all 0.3s;
}

.gd-death-close-btn:hover {
    background: linear-gradient(135deg, #c9a84c, #ffd700);
}

.gd-success-overlay {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse at center, rgba(20, 15, 5, 0.95), rgba(0, 0, 0, 0.98));
    z-index: 10;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 24px;
    gap: 16px;
}

.gd-success-overlay.active {
    display: flex;
}

.gd-success-text {
    font-size: 2em;
    font-weight: bold;
    color: #ffd700;
    animation: bounceIn 0.8s ease;
}

.gd-success-gold {
    font-size: 1.8em;
    font-weight: bold;
    color: #ffd700;
    font-family: 'Courier New', monospace;
}

.gd-success-floor {
    color: #c9a84c;
    font-size: 1em;
}

.gd-success-close-btn {
    margin-top: 10px;
    padding: 12px 40px;
    background: linear-gradient(135deg, #8b6914, #c9a84c);
    border: none;
    border-radius: 10px;
    color: #1a1209;
    font-weight: bold;
    font-size: 1em;
    cursor: pointer;
    transition: all 0.3s;
}

.gd-success-close-btn:hover {
    background: linear-gradient(135deg, #c9a84c, #ffd700);
}

.gd-special-overlay {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse at center, rgba(20, 15, 5, 0.95), rgba(0, 0, 0, 0.98));
    z-index: 10;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 24px;
    gap: 20px;
    padding: 30px;
}

.gd-special-overlay.active {
    display: flex;
}

.gd-special-icon {
    font-size: 4em;
    animation: bounceIn 0.6s ease;
}

.gd-special-title {
    font-size: 1.5em;
    font-weight: bold;
    color: #ffd700;
    text-align: center;
}

.gd-special-desc {
    color: #c9a84c;
    text-align: center;
    font-size: 0.95em;
    line-height: 1.5;
}

.gd-special-actions {
    display: flex;
    gap: 12px;
}

.gd-special-btn {
    padding: 12px 30px;
    border: none;
    border-radius: 10px;
    font-weight: bold;
    font-size: 0.95em;
    cursor: pointer;
    transition: all 0.3s;
}

.gd-special-btn.primary {
    background: linear-gradient(135deg, #8b6914, #c9a84c);
    color: #1a1209;
}

.gd-special-btn.primary:hover {
    background: linear-gradient(135deg, #c9a84c, #ffd700);
}

.gd-special-btn.danger {
    background: linear-gradient(135deg, #c0392b, #e74c3c);
    color: #fff;
}

.gd-special-btn.danger:hover {
    box-shadow: 0 0 20px rgba(231, 76, 60, 0.4);
}

.gd-special-btn.secondary {
    background: rgba(139, 105, 20, 0.3);
    color: #c9a84c;
    border: 1px solid rgba(139, 105, 20, 0.5);
}

.gd-special-btn.secondary:hover {
    background: rgba(139, 105, 20, 0.5);
}

.gd-coin-flip {
    font-size: 3em;
    animation: coinFlip 1.5s ease-out;
    display: inline-block;
}

.gd-ranking-table {
    width: 100%;
    border-collapse: collapse;
}

.gd-ranking-table th {
    padding: 10px 12px;
    color: #ffd700;
    font-size: 0.85em;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 2px solid rgba(139, 105, 20, 0.4);
    text-align: left;
}

.gd-ranking-table td {
    padding: 10px 12px;
    border-bottom: 1px solid rgba(139, 105, 20, 0.15);
    font-size: 0.9em;
}

.gd-ranking-table tr:hover {
    background: rgba(139, 105, 20, 0.1);
}

.gd-ranking-table .rank-1 td { color: #ffd700; font-weight: bold; }
.gd-ranking-table .rank-2 td { color: #c0c0c0; font-weight: bold; }
.gd-ranking-table .rank-3 td { color: #cd7f32; font-weight: bold; }

.gd-ranking-table .my-rank {
    background: rgba(255, 215, 0, 0.1);
}

.gd-ranking-table .my-rank td {
    color: #ffd700;
    font-weight: bold;
}

.gd-my-rank-section {
    margin-top: 16px;
    padding: 12px 16px;
    background: rgba(139, 105, 20, 0.15);
    border: 1px solid rgba(139, 105, 20, 0.3);
    border-radius: 12px;
    text-align: center;
}

.gd-ranking-empty {
    text-align: center;
    padding: 40px;
    color: #6b5a3e;
    font-size: 0.95em;
}

.gd-shake {
    animation: screenShake 0.5s ease;
}

.gd-safezone-badge {
    display: inline-block;
    background: linear-gradient(135deg, #2ecc71, #27ae60);
    color: #fff;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.75em;
    font-weight: bold;
    margin-left: 8px;
    letter-spacing: 1px;
}

.gd-special-result-overlay {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse at center, rgba(20, 15, 5, 0.95), rgba(0, 0, 0, 0.98));
    z-index: 10;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 24px;
    gap: 16px;
    padding: 30px;
}

.gd-special-result-overlay.active {
    display: flex;
}

.gd-door-back.big-gold {
    background: linear-gradient(135deg, #b8860b, #ffd700, #fff8dc, #ffd700, #b8860b);
    border: 2px solid #ffd700;
    box-shadow: 0 0 40px rgba(255, 215, 0, 0.6);
}

.gd-door-back.big-gold .gd-door-icon {
    font-size: 3em;
}

.gd-door-back.jackpot {
    background: linear-gradient(135deg, #ff6b35, #ffd700, #ff69b4, #ffd700, #ff6b35);
    border: 2px solid #ffd700;
    box-shadow: 0 0 50px rgba(255, 215, 0, 0.8), 0 0 100px rgba(255, 105, 180, 0.3);
}

.gd-door-back.jackpot .gd-door-icon {
    font-size: 3em;
    animation: bounceIn 0.6s ease;
}

.gd-door-back.shield {
    background: linear-gradient(135deg, #1a5e2a, #2ecc71, #27ae60, #2ecc71, #1a5e2a);
    border: 2px solid #2ecc71;
    box-shadow: 0 0 30px rgba(46, 204, 113, 0.5);
}

.gd-door-back.shield .gd-door-icon {
    font-size: 3em;
}

.gd-door-back.double-next {
    background: linear-gradient(135deg, #2d1b69, #8e44ad, #9b59b6, #8e44ad, #2d1b69);
    border: 2px solid #9b59b6;
    box-shadow: 0 0 30px rgba(155, 89, 182, 0.5);
}

.gd-door-back.double-next .gd-door-icon {
    font-size: 3em;
}

.gd-door-label {
    font-size: 0.65em;
    font-weight: bold;
    margin-top: 2px;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.gd-door.gd-door-small {
    width: 80px;
    height: 110px;
}

.gd-door.gd-door-small .gd-door-question {
    font-size: 2em;
}

.gd-door.gd-door-small .gd-door-icon {
    font-size: 2.5em !important;
}

.gd-doors-container.gd-doors-tight {
    gap: 12px;
}

.gd-doors-container.gd-doors-compact {
    gap: 8px;
}

@keyframes jackpotCelebrate {
    0% { box-shadow: 0 0 30px rgba(255, 215, 0, 0.5); }
    25% { box-shadow: 0 0 60px rgba(255, 105, 180, 0.6); }
    50% { box-shadow: 0 0 80px rgba(255, 215, 0, 0.8); }
    75% { box-shadow: 0 0 60px rgba(255, 69, 0, 0.6); }
    100% { box-shadow: 0 0 30px rgba(255, 215, 0, 0.5); }
}

.gd-jackpot-celebrate {
    animation: jackpotCelebrate 1s ease-in-out 3;
}

.gd-earned-gold {
    text-align: center;
    font-size: 1.3em;
    font-weight: bold;
    font-family: 'Courier New', monospace;
    animation: bounceIn 0.5s ease;
    display: none;
    color: #ffd700;
}

.gd-earned-big-gold {
    color: #fff8dc;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.8);
}

.gd-earned-jackpot {
    color: #ff69b4;
    text-shadow: 0 0 15px rgba(255, 105, 180, 0.8), 0 0 30px rgba(255, 215, 0, 0.5);
    font-size: 1.6em;
}

.gd-earned-shield {
    color: #2ecc71;
}

.gd-earned-double-next {
    color: #9b59b6;
}

@keyframes floatUp {
    0% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
    100% { opacity: 0; transform: translate(-50%, -100%) scale(1.2); }
}

.gd-floating-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.1em;
    font-weight: bold;
    color: #ffd700;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.8);
    animation: floatUp 2s ease-out forwards;
    pointer-events: none;
    z-index: 5;
    white-space: nowrap;
}

.gd-safe-notification {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.9);
    border: 2px solid #2ecc71;
    border-radius: 16px;
    padding: 20px 30px;
    text-align: center;
    color: #e8d5a3;
    font-size: 1.1em;
    z-index: 8;
    box-shadow: 0 0 40px rgba(46, 204, 113, 0.3);
    animation: bounceIn 0.5s ease;
}

.gd-safe-notification.fade-out {
    opacity: 0;
    transition: opacity 0.5s;
}

.gd-special-cards {
    display: flex;
    gap: 16px;
    justify-content: center;
}

.gd-special-card {
    width: 100px;
    height: 140px;
    cursor: pointer;
    perspective: 1000px;
}

.gd-special-card.disabled {
    cursor: default;
    opacity: 0.6;
}

.gd-special-card-inner {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.gd-special-card.flipped .gd-special-card-inner {
    transform: rotateY(180deg);
}

.gd-special-card:hover:not(.flipped):not(.disabled) .gd-special-card-inner {
    transform: translateY(-8px);
}

.gd-special-card-front,
.gd-special-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.gd-special-card-front {
    background: linear-gradient(180deg, #1a0d2e, #0d0520);
    border: 2px solid rgba(138, 43, 226, 0.5);
    color: #8a2be2;
    font-size: 2.5em;
    font-weight: bold;
    overflow: hidden;
}

.gd-special-card-front::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 300%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(138, 43, 226, 0.08), transparent);
    animation: doorShimmer 3s ease-in-out infinite;
    pointer-events: none;
}

.gd-special-card-back {
    transform: rotateY(180deg);
    background: linear-gradient(135deg, #1a0d2e, #2d1b69, #1a0d2e);
    border: 2px solid #8a2be2;
    box-shadow: 0 0 20px rgba(138, 43, 226, 0.4);
    padding: 8px;
}

.gd-special-card-icon {
    font-size: 2.5em;
}

.gd-special-card-name {
    font-size: 0.75em;
    font-weight: bold;
    color: #c9a84c;
    margin-top: 4px;
    text-align: center;
}

.gd-special-card:hover:not(.flipped):not(.disabled) .gd-special-card-front {
    border-color: rgba(138, 43, 226, 0.8);
    box-shadow: 0 0 20px rgba(138, 43, 226, 0.3);
}

@media (max-width: 1024px) {
    #golden-dungeon-modal .modal-content {
        max-width: 100%;
        width: 100%;
        height: 100vh;
        max-height: 100vh;
        border-radius: 0;
        border: none;
    }
    .gd-death-overlay,
    .gd-success-overlay,
    .gd-special-overlay,
    .gd-special-result-overlay {
        border-radius: 0;
    }
}

@media (max-width: 600px) {
    .gd-difficulty-cards {
        flex-direction: column;
    }
    .gd-door {
        width: 80px;
        height: 110px;
    }
    .gd-door-question {
        font-size: 2em;
    }
    .gd-door-back .gd-door-icon {
        font-size: 2.5em !important;
    }
    .gd-special-cards {
        gap: 10px;
    }
    .gd-special-card {
        width: 80px;
        height: 110px;
    }
    .gd-special-card-icon {
        font-size: 2em;
    }
    .gd-actions {
        flex-direction: column;
    }
    .gd-floor-number {
        font-size: 1.5em;
    }
    .gd-gold-value {
        font-size: 1em;
    }
    .gd-doors-container {
        gap: 10px;
    }
    .gd-special-actions {
        flex-direction: column;
        width: 100%;
    }
    .gd-special-btn {
        width: 100%;
    }
}
