/* Python Kâşifi: Dünya Turu - Stil Dosyası */

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    overflow: hidden;
    height: 100vh;
}

.game-container {
    display: flex;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
}

/* Sol Panel - Kod */
.code-panel {
    flex: 1;
    background: linear-gradient(180deg, #2d2d44 0%, #1a1a2e 100%);
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
    box-shadow: 4px 0 10px rgba(0, 0, 0, 0.3);
}

.level-header {
    background: rgba(100, 100, 255, 0.1);
    padding: 20px;
    border-radius: 10px;
    border-left: 4px solid #40E0D0;
}

.player-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.player-name {
    font-size: 18px;
    font-weight: bold;
    color: #FFD700;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.player-progress {
    font-size: 14px;
    color: #40E0D0;
    background: rgba(64, 224, 208, 0.2);
    padding: 4px 12px;
    border-radius: 15px;
}

.player-name-input {
    width: 100%;
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(64, 224, 208, 0.5);
    border-radius: 8px;
    color: #fff;
    font-size: 16px;
    margin: 20px 0;
    transition: all 0.3s;
}

.player-name-input:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.2);
    border-color: #40E0D0;
    box-shadow: 0 0 15px rgba(64, 224, 208, 0.5);
}

.player-name-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.level-header {

.level-header h1 {
    font-size: 24px;
    color: #40E0D0;
    margin-bottom: 15px;
    text-shadow: 0 0 10px rgba(64, 224, 208, 0.5);
}

.progress-bar {
    position: relative;
    width: 100%;
    height: 25px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 15px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #40E0D0, #FFD700);
    transition: width 0.5s ease;
    border-radius: 15px;
}

.progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 12px;
    font-weight: bold;
    color: #fff;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

.level-info {
    background: rgba(0, 0, 0, 0.2);
    padding: 15px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.level-info h2 {
    font-size: 16px;
    color: #f0f0f0;
    line-height: 1.5;
    font-weight: normal;
}

.code-block {
    background: #1e1e1e;
    padding: 20px;
    border-radius: 8px;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.6;
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid rgba(100, 200, 255, 0.3);
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.5);
}

.code-line {
    display: flex;
    align-items: center;
    padding: 2px 0;
    transition: background 0.2s;
}

.code-line:hover {
    background: rgba(255, 255, 255, 0.05);
}

.line-number {
    display: inline-block;
    width: 40px;
    color: #858585;
    text-align: right;
    margin-right: 15px;
    user-select: none;
    flex-shrink: 0;
}

.code-normal {
    color: #d4d4d4;
}

.code-comment {
    color: #6a9955;
    font-style: italic;
}

.code-keyword {
    color: #c586c0;
    font-weight: bold;
}

.code-function {
    color: #4fc1ff;
}

.code-variable {
    color: #9cdcfe;
}

.feedback-area {
    min-height: 80px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.feedback-message {
    padding: 15px;
    border-radius: 8px;
    font-size: 18px;
    font-weight: bold;
    text-align: center;
    animation: fadeInScale 0.3s ease;
    display: none;
}

.feedback-message.success {
    background: rgba(46, 204, 113, 0.3);
    border: 2px solid #2ecc71;
    color: #FFD700;
}

.feedback-message.error {
    background: rgba(231, 76, 60, 0.3);
    border: 2px solid #e74c3c;
    color: #ff6b6b;
}

.controls-info {
    background: rgba(0, 0, 0, 0.3);
    padding: 10px;
    border-radius: 5px;
    font-size: 13px;
    text-align: center;
    color: #aaa;
}

.controls-info p {
    margin: 5px 0;
}

kbd {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 3px;
    padding: 2px 6px;
    font-family: monospace;
    font-size: 12px;
    color: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.input-display {
    background: rgba(0, 0, 0, 0.2);
    padding: 15px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.input-display h3 {
    font-size: 14px;
    color: #40E0D0;
    margin-bottom: 10px;
}

.input-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    min-height: 40px;
}

.input-chip {
    background: linear-gradient(135deg, #40E0D0, #4fc1ff);
    color: #fff;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 20px;
    font-weight: bold;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
    animation: chipIn 0.3s ease;
}

.input-chip.expected {
    background: rgba(100, 100, 100, 0.3);
    color: #888;
    border: 1px dashed #666;
}

/* Sağ Panel - Harita */
.map-panel {
    flex: 1;
    background: #0f0f1e;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
}

#map-canvas {
    border: 3px solid rgba(64, 224, 208, 0.5);
    border-radius: 10px;
    box-shadow: 0 0 30px rgba(64, 224, 208, 0.3);
    background: #1a1a2e;
}

.map-legend {
    position: absolute;
    bottom: 30px;
    right: 30px;
    background: rgba(0, 0, 0, 0.7);
    padding: 15px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 5px 0;
    font-size: 14px;
}

.legend-marker {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid #fff;
}

.legend-marker.player-marker {
    background: #40E0D0;
    box-shadow: 0 0 10px #40E0D0;
}

.legend-marker.target-marker {
    background: #E31E23;
    box-shadow: 0 0 10px #FFD700;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background: linear-gradient(135deg, #2d2d44, #1a1a2e);
    padding: 40px;
    border-radius: 15px;
    text-align: center;
    max-width: 500px;
    border: 3px solid #FFD700;
    box-shadow: 0 0 50px rgba(255, 215, 0, 0.5);
    animation: scaleIn 0.5s ease;
}

.modal-content h2 {
    font-size: 36px;
    color: #FFD700;
    margin-bottom: 20px;
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.8);
}

.modal-content p {
    font-size: 18px;
    line-height: 1.6;
    margin: 15px 0;
    color: #f0f0f0;
}

.completion-stats {
    background: rgba(64, 224, 208, 0.1);
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #40E0D0;
    margin: 20px 0;
}

.btn-primary {
    background: linear-gradient(135deg, #40E0D0, #4fc1ff);
    color: #fff;
    border: none;
    padding: 15px 40px;
    font-size: 18px;
    font-weight: bold;
    border-radius: 25px;
    cursor: pointer;
    margin-top: 20px;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 15px rgba(64, 224, 208, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(64, 224, 208, 0.6);
}

.btn-primary:active {
    transform: translateY(0);
}

/* Animasyonlar */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes chipIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Tasarım */
@media (max-width: 1024px) {
    .game-container {
        flex-direction: column;
    }
    
    .code-panel {
        max-height: 50vh;
    }
    
    #map-canvas {
        max-width: 90vw;
        max-height: 40vh;
    }
    
    .level-header h1 {
        font-size: 18px;
    }
    
    .code-block {
        font-size: 12px;
        max-height: 150px;
    }
}

@media (max-width: 768px) {
    .code-panel {
        padding: 15px;
        gap: 15px;
    }
    
    .level-header {
        padding: 15px;
    }
    
    .level-header h1 {
        font-size: 16px;
    }
    
    .code-block {
        font-size: 11px;
        padding: 10px;
    }
    
    .map-legend {
        bottom: 10px;
        right: 10px;
        padding: 10px;
        font-size: 12px;
    }
    
    .modal-content {
        padding: 25px;
        margin: 20px;
    }
    
    .modal-content h2 {
        font-size: 28px;
    }
}

/* Scrollbar Özelleştirme */
.code-panel::-webkit-scrollbar,
.code-block::-webkit-scrollbar {
    width: 8px;
}

.code-panel::-webkit-scrollbar-track,
.code-block::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}

.code-panel::-webkit-scrollbar-thumb,
.code-block::-webkit-scrollbar-thumb {
    background: rgba(64, 224, 208, 0.5);
    border-radius: 4px;
}

.code-panel::-webkit-scrollbar-thumb:hover,
.code-block::-webkit-scrollbar-thumb:hover {
    background: rgba(64, 224, 208, 0.8);
}
