/* css.style.css V1.9.1*/
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: #000;
    color: #e6e6ff;
    overflow: hidden;
    height: 100vh;
    position: relative;
}

.game-container {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
}

#game-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

/* Map and Theme Indicators */
.indicator {
    position: absolute;
    top: 15px;
    padding: 8px 15px;
    background: rgba(0, 0, 0, 0.7);
    border: 1px solid #ffffff;
    border-radius: 20px;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    box-shadow: 0 0 15px rgba(76, 201, 240, 0.3);
    backdrop-filter: blur(5px);
}

.map-indicator {
    right: 15px;
}

.theme-indicator {
    left: 15px;
}

/* Player and NPC */
.player {
    position: absolute;
    width: 30px;
    height: 30px;
    background: #fff;
    border-radius: 50%;
    border: 2px solid #aaa;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.5);
    z-index: 5;
    transition: transform 0.2s;
}

.npc {
    position: absolute;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid #fff;
    z-index: 4;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    color: #fff;
    font-size: 18px;
}

.npc.nearby {
    transform: scale(1.1);
    transition: all 0.3s;
}

/* Portals */
.portal {
    position: absolute;
    width: 72px;
    height: 72px;
    border-radius: 50%;
    z-index: 3;
    display: none;
    justify-content: center;
    align-items: center;
    animation: portal-pulse 2s infinite;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.5);
}

.primary-portal {
    background: radial-gradient(circle, rgba(200,200,200,0.8) 0%, rgba(150,150,150,0.8) 100%);
    box-shadow: 0 0 40px rgba(200, 200, 200, 0.8);
}

.secondary-portal {
    background: radial-gradient(circle, rgba(150,150,150,0.8) 0%, rgba(100,100,100,0.8) 100%);
    box-shadow: 0 0 40px rgba(150, 150, 150, 0.8);
}

.portal-label {
    position: absolute;
    bottom: -30px;
    background: rgba(0, 0, 30, 0.8);
    color: #fff;
    padding: 5px 10px;
    border-radius: 10px;
    font-size: 12px;
    white-space: nowrap;
    border: 1px solid #ffffff;
}

@keyframes portal-pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Control Panel */
.control-panel {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 15px;
    padding: 15px;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 50px;
    z-index: 10;
    border: 1px solid #ffffff;
    backdrop-filter: blur(5px);
}

.control-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #555, #333);
    border: 2px solid #777;
    color: white;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s;
    box-shadow: 0 0 15px rgba(100, 100, 100, 0.5);
}

.control-btn:hover {
    transform: scale(1.1);
    background: linear-gradient(135deg, #444, #222);
    box-shadow: 0 0 20px rgba(150, 150, 150, 0.8);
}

/* Info Panel */
.info-panel {
    position: absolute;
    top: 60px;
    right: 20px;
    width: 320px;
    background: rgba(10, 15, 40, 0.95);
    border: 2px solid #ffffff;
    border-radius: 15px;
    padding: 20px;
    z-index: 20;
    display: none;
    backdrop-filter: blur(5px);
    flex-direction: column;
}

.info-panel.active {
    display: flex;
}

.info-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #ffffff;
}

.info-header h2 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    color: #ffffff;
}

.close-info-btn {
    background: none;
    border: none;
    color: #f72585;
    font-size: 20px;
    cursor: pointer;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background 0.3s;
}

.close-info-btn:hover {
    background: rgba(247, 37, 133, 0.2);
}

.info-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 15px;
}

.info-table td {
    padding: 8px 5px;
    border-bottom: 1px solid rgba(76, 201, 240, 0.3);
    font-size: 14px;
}

.info-table tr:last-child td {
    border-bottom: none;
}

.info-table td:first-child {
    color: #b8c1ec;
}

.info-table td:last-child {
    text-align: right;
    font-weight: bold;
    color: #ffffff;
}

.info-log {
    background: rgba(5, 10, 30, 0.7);
    border-radius: 10px;
    padding: 10px;
    height: 150px;
    overflow-y: auto;
    margin-top: 10px;
    border: 1px solid rgba(76, 201, 240, 0.3);
}

.log-entry {
    font-size: 12px;
    margin-bottom: 5px;
    padding: 3px 0;
    border-bottom: 1px dotted rgba(76, 201, 240, 0.2);
}

.log-time {
    color: #ffffff;
    margin-right: 8px;
}

/* Chat Interface */
.chat-interface {
    position: absolute;
    bottom: 100px;
    left: 20px;
    width: 350px;
    background: rgba(10, 15, 40, 0.95);
    border: 2px solid #ffffff;
    border-radius: 15px;
    z-index: 20;
    display: none;
    flex-direction: column;
    backdrop-filter: blur(5px);
    box-shadow: 0 0 30px rgba(76, 201, 240, 0.4);
}

.chat-interface.active {
    display: flex;
}

.chat-header {
    padding: 15px;
    border-bottom: 1px solid #ffffff;
}

.chat-header h2 {
    font-size: 18px;
    color: #ffffff;
}

.chat-area {
    height: 250px;
    overflow-y: auto;
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.message {
    padding: 10px 15px;
    border-radius: 15px;
    max-width: 80%;
    font-size: 14px;
    line-height: 1.4;
    position: relative;
}

.ai-message {
    background: rgba(76, 201, 240, 0.2);
    align-self: flex-start;
    border-bottom-left-radius: 5px;
}

.user-message {
    background: rgba(247, 37, 133, 0.2);
    align-self: flex-end;
    border-bottom-right-radius: 5px;
}

.input-area {
    display: flex;
    padding: 15px;
    border-top: 1px solid #ffffff;
}

#chat-input {
    flex: 1;
    padding: 10px 15px;
    border-radius: 20px;
    border: 1px solid #ffffff;
    background: rgba(5, 10, 30, 0.7);
    color: white;
    outline: none;
}

#send-btn {
    background: linear-gradient(135deg, #555, #333);
    border: none;
    color: white;
    padding: 10px 20px;
    border-radius: 20px;
    margin-left: 10px;
    cursor: pointer;
    transition: all 0.3s;
}

#send-btn:hover {
    background: linear-gradient(135deg, #444, #222);
    transform: scale(1.05);
}

/* Teaching Panel */
.teaching-panel {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 450px;
    background: rgba(10, 15, 40, 0.95);
    border: 2px solid #ffffff;
    border-radius: 15px;
    padding: 25px;
    z-index: 20;
    display: none;
    flex-direction: column;
    backdrop-filter: blur(5px);
    box-shadow: 0 0 40px rgba(76, 201, 240, 0.5);
}

.teaching-panel.active {
    display: flex;
}

.close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    color: #f72585;
    font-size: 20px;
    cursor: pointer;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background 0.3s;
}

.close-btn:hover {
    background: rgba(247, 37, 133, 0.2);
}

.teaching-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    color: #ffffff;
}

.teaching-header h2 {
    font-size: 22px;
}

.teaching-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    color: #b8c1ec;
    font-size: 14px;
}

.form-group input,
.form-group textarea {
    padding: 12px 15px;
    border-radius: 10px;
    border: 1px solid #ffffff;
    background: rgba(5, 10, 30, 0.7);
    color: white;
    outline: none;
    font-size: 14px;
}

.form-group textarea {
    height: 100px;
    resize: vertical;
}

.teach-btn {
    background: linear-gradient(135deg, #555, #333);
    border: none;
    color: white;
    padding: 12px;
    border-radius: 10px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 10px;
}

.teach-btn:hover {
    background: linear-gradient(135deg, #444, #222);
    transform: scale(1.02);
}

/* Notification */
.notification {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(100, 100, 100, 0.9);
    color: white;
    padding: 12px 25px;
    border-radius: 30px;
    z-index: 15;
    opacity: 0;
    transition: opacity 0.3s;
    backdrop-filter: blur(5px);
    box-shadow: 0 5px 15px rgba(100, 100, 100, 0.4);
}

.notification.show {
    opacity: 1;
}

/* Particle effect */
.particle {
    position: absolute;
    background: #fff;
    border-radius: 50%;
    pointer-events: none;
    z-index: 2;
}

/* Map backgrounds */
.map1 { background: rgba(20, 20, 30, 0.8); }
.map2 { background: rgba(30, 20, 20, 0.8); }
.map3 { background: rgba(20, 30, 20, 0.8); }
.map4 { background: rgba(30, 30, 20, 0.8); }
.map5 { background: rgba(20, 30, 30, 0.8); }
.map6 { background: rgba(30, 20, 30, 0.8); }
.map7 { background: rgba(20, 20, 40, 0.8); }
.map8 { background: rgba(40, 20, 20, 0.8); }
.map9 { background: rgba(20, 40, 20, 0.8); }

/* Sequence display */
.sequence-display {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    padding: 10px 20px;
    border-radius: 20px;
    border: 1px solid #ffffff;
    z-index: 10;
    display: flex;
    gap: 10px;
    backdrop-filter: blur(5px);
}

.sequence-item {
    width: 30px;
    height: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(76, 201, 240, 0.2);
    border-radius: 8px;
    font-weight: bold;
}

.sequence-item.active {
    background: rgba(247, 37, 133, 0.5);
    transform: scale(1.1);
}