* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Courier New', monospace;
    background: linear-gradient(45deg, #2c1810, #3d2817);
    overflow: hidden;
    color: #fff;
    image-rendering: pixelated;
    -webkit-image-rendering: pixelated;
    min-height: 100vh;
}

#gameContainer {
    width: 100vw;
    height: 100vh;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

#gameCanvas {
    position: absolute;
    top: 0;
    left: 0;
    background: linear-gradient(135deg, #8B7355 0%, #A0916B 25%, #8B7355 50%, #A0916B 75%, #8B7355 100%);
    border: 3px solid #4A2C14;
}

.room-element {
    position: absolute;
    cursor: pointer;
    transition: transform 0.2s ease;
    image-rendering: pixelated;
    z-index: 10;
}

.room-element:hover {
    transform: scale(1.05);
    filter: brightness(1.2) drop-shadow(0 0 8px rgba(255,215,0,0.6));
}

#character {
    position: absolute;
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #FF4500 0%, #FF6347 50%, #FF4500 100%);
    border: 2px solid #8B0000;
    border-radius: 8px 8px 4px 4px;
    transition: all 0.3s ease;
    z-index: 100;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

#character::before {
    content: '';
    position: absolute;
    width: 28px;
    height: 20px;
    background: #FDBCB4;
    border: 1px solid #8B0000;
    border-radius: 50% 50% 20% 20%;
    top: 2px;
    left: 1px;
}

#character::after {
    content: '';
    position: absolute;
    width: 4px;
    height: 4px;
    background: #000;
    border-radius: 50%;
    top: 8px;
    left: 8px;
    box-shadow: 12px 0 0 #000;
}

.chest {
    width: 48px;
    height: 36px;
    background: linear-gradient(135deg, #8B4513 0%, #A0522D 30%, #8B4513 70%, #654321 100%);
    border: 2px solid #4A2C14;
    border-radius: 6px;
    position: relative;
    box-shadow: 0 4px 8px rgba(0,0,0,0.4), inset 0 2px 4px rgba(255,255,255,0.1);
}

.chest::before {
    content: '';
    position: absolute;
    width: 16px;
    height: 8px;
    background: linear-gradient(45deg, #FFD700, #FFA500);
    border: 1px solid #B8860B;
    border-radius: 3px;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.chest::after {
    content: '';
    position: absolute;
    width: 12px;
    height: 2px;
    background: #654321;
    top: 18px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 2px;
}

/* Yeni özel sandık stilleri */
.special-chest {
    background: linear-gradient(135deg, #4169E1 0%, #6495ED 30%, #4169E1 70%, #191970 100%);
    animation: glow-blue 2s ease-in-out infinite alternate;
}

.special-chest::before {
    background: linear-gradient(45deg, #00FFFF, #0080FF);
    border-color: #0066CC;
}

.tech-chest {
    background: linear-gradient(135deg, #00CED1 0%, #40E0D0 30%, #00CED1 70%, #008B8B 100%);
    animation: glow-teal 2s ease-in-out infinite alternate;
}

.tech-chest::before {
    background: linear-gradient(45deg, #00FFFF, #00FA9A);
    border-color: #00A86B;
}

@keyframes glow-blue {
    from { box-shadow: 0 0 5px #4169E1, 0 0 10px #4169E1, 0 0 15px #4169E1; }
    to { box-shadow: 0 0 10px #4169E1, 0 0 20px #4169E1, 0 0 30px #4169E1; }
}

@keyframes glow-teal {
    from { box-shadow: 0 0 5px #00CED1, 0 0 10px #00CED1, 0 0 15px #00CED1; }
    to { box-shadow: 0 0 10px #00CED1, 0 0 20px #00CED1, 0 0 30px #00CED1; }
}

.furniture {
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

.table {
    width: 80px;
    height: 60px;
    background: linear-gradient(135deg, #DEB887 0%, #D2B48C 50%, #CD853F 100%);
    border: 2px solid #8B7355;
    border-radius: 12px;
    position: relative;
}

.table::before {
    content: '';
    position: absolute;
    width: 70px;
    height: 50px;
    background: linear-gradient(135deg, #F5DEB3, #DEB887);
    border: 1px solid #CD853F;
    border-radius: 8px;
    top: 4px;
    left: 4px;
}

.chair {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #8B4513 0%, #A0522D 50%, #8B4513 100%);
    border: 2px solid #654321;
    border-radius: 6px;
    position: relative;
}

.chair::before {
    content: '';
    position: absolute;
    width: 28px;
    height: 8px;
    background: linear-gradient(135deg, #CD853F, #DEB887);
    border-radius: 4px;
    top: 18px;
    left: 1px;
}

.chair::after {
    content: '';
    position: absolute;
    width: 28px;
    height: 12px;
    background: linear-gradient(135deg, #CD853F, #DEB887);
    border-radius: 4px 4px 0 0;
    top: -2px;
    left: 1px;
}

.bed {
    width: 96px;
    height: 64px;
    background: linear-gradient(135deg, #8B0000 0%, #B22222 30%, #DC143C 70%, #B22222 100%);
    border: 3px solid #4A0000;
    border-radius: 12px;
    position: relative;
}

.bed::before {
    content: '';
    position: absolute;
    width: 80px;
    height: 48px;
    background: linear-gradient(135deg, #FFF8DC, #F5F5DC);
    border: 2px solid #DDD;
    border-radius: 8px;
    top: 6px;
    left: 6px;
}

.bed::after {
    content: '';
    position: absolute;
    width: 88px;
    height: 16px;
    background: linear-gradient(135deg, #654321, #8B4513);
    border-radius: 8px;
    bottom: -2px;
    left: 1px;
}

.window {
    width: 64px;
    height: 80px;
    background: linear-gradient(135deg, #4682B4 0%, #87CEEB 50%, #4682B4 100%);
    border: 4px solid #654321;
    border-radius: 8px;
    position: relative;
    box-shadow: inset 0 0 16px rgba(255,255,255,0.3);
}

.window::before {
    content: '';
    position: absolute;
    width: 2px;
    height: 72px;
    background: #654321;
    left: 50%;
    top: 4px;
    transform: translateX(-50%);
}

.window::after {
    content: '';
    position: absolute;
    width: 56px;
    height: 2px;
    background: #654321;
    top: 50%;
    left: 4px;
    transform: translateY(-50%);
}

.door {
    width: 48px;
    height: 80px;
    background: linear-gradient(135deg, #8B4513 0%, #A0522D 30%, #8B4513 70%, #654321 100%);
    border: 3px solid #4A2C14;
    border-radius: 8px 8px 0 0;
    position: relative;
}

.door::before {
    content: '';
    position: absolute;
    width: 8px;
    height: 8px;
    background: linear-gradient(45deg, #FFD700, #FFA500);
    border: 1px solid #B8860B;
    border-radius: 50%;
    top: 50%;
    right: 8px;
    transform: translateY(-50%);
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.door::after {
    content: '';
    position: absolute;
    width: 32px;
    height: 48px;
    background: linear-gradient(135deg, rgba(139,69,19,0.3), rgba(160,82,45,0.3));
    border-radius: 4px;
    top: 16px;
    left: 6px;
}

.bookshelf {
    width: 48px;
    height: 80px;
    background: linear-gradient(135deg, #8B4513, #A0522D);
    border: 2px solid #654321;
    border-radius: 4px;
    position: relative;
}

.bookshelf::before {
    content: '';
    position: absolute;
    width: 40px;
    height: 8px;
    background: #654321;
    top: 20px;
    left: 4px;
    box-shadow: 0 16px 0 #654321, 0 32px 0 #654321, 0 48px 0 #654321;
}

.bookshelf::after {
    content: '📚';
    position: absolute;
    font-size: 12px;
    top: 24px;
    left: 8px;
}

.plant {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #8B4513, #A0522D);
    border: 2px solid #654321;
    border-radius: 50% 50% 50% 50% / 30% 30% 70% 70%;
    position: relative;
}

.plant::before {
    content: '🌿';
    position: absolute;
    font-size: 16px;
    top: -4px;
    left: 6px;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.9);
}

.modal-content {
    background: linear-gradient(135deg, #2c1810 0%, #3d2817 50%, #2c1810 100%);
    margin: 5% auto;
    padding: 40px;
    border: 4px solid #FFD700;
    width: 85%;
    max-width: 700px;
    border-radius: 20px;
    color: #fff;
    box-shadow: 0 0 40px rgba(255,215,0,0.6), inset 0 0 20px rgba(255,215,0,0.1);
    position: relative;
}

.modal-content::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #FFD700, #FFA500, #FFD700, #FFA500);
    border-radius: 22px;
    z-index: -1;
}

.close {
    color: #FFD700;
    float: right;
    font-size: 32px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
}

.close:hover {
    color: #FFF;
    transform: scale(1.1);
}

h2 {
    color: #FFD700;
    margin-bottom: 25px;
    text-align: center;
    font-size: 28px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
}

#instructions {
    position: absolute;
    top: 20px;
    left: 20px;
    background: linear-gradient(135deg, rgba(0,0,0,0.8), rgba(20,20,20,0.9));
    color: #FFD700;
    padding: 20px;
    border-radius: 12px;
    font-size: 14px;
    z-index: 200;
    border: 2px solid #FFD700;
    box-shadow: 0 0 20px rgba(255,215,0,0.3);
}

#logo {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 40px;
    font-weight: bold;
    color: #FFD700;
    text-shadow: 3px 3px 6px rgba(0,0,0,0.8);
    z-index: 200;
    background: linear-gradient(45deg, #FFD700, #FFA500);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.project-link {
    display: inline-block;
    margin: 15px 0;
    padding: 15px 25px;
    background: linear-gradient(135deg, #4169E1 0%, #1E40AF 50%, #1E3A8A 100%);
    color: #fff;
    text-decoration: none;
    border-radius: 12px;
    transition: all 0.3s ease;
    font-weight: bold;
    box-shadow: 0 4px 12px rgba(65,105,225,0.4);
}

.project-link:hover {
    background: linear-gradient(135deg, #1E40AF 0%, #1E3A8A 50%, #1E40AF 100%);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(65,105,225,0.6);
}

.wall {
    position: absolute;
    background: linear-gradient(135deg, #8B7355 0%, #A0916B 50%, #8B7355 100%);
    border: 3px solid #654321;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.3);
    z-index: 20;
}
@media (max-width: 900px) {
    #gameContainer {
        min-width: 100vw;
        min-height: 100vh;
    }
    .room-element {
        width: 80% !important;
        left: 10vw !important;
        right: auto !important;
        top: auto !important;
        bottom: auto !important;
    }
    #character {
        width: 24px;
        height: 24px;
    }
    .chest, .table, .chair, .bed, .bookshelf, .plant, .window, .door {
        min-width: 24px;
        min-height: 24px;
    }
}

.interactive-hint {
    position: absolute;
    background: rgba(255,215,0,0.9);
    color: #000;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: bold;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 150;
}

.room-element:hover .interactive-hint {
    opacity: 1;
}

@keyframes bounce {
    0%, 20%, 60%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    80% { transform: translateY(-5px); }
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes fadeOut {
    from { opacity: 1; transform: scale(1); }
    to { opacity: 0; transform: scale(0.9); }
}

.chest:hover {
    animation: bounce 0.6s ease-in-out !important;
}
