* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 50%, #16213e 100%);
    color: #ffffff;
    overflow: hidden;
    height: 100vh;
}

/* Screen Management */
.screen {
    display: none;
    width: 100%;
    height: 100vh;
    position: absolute;
    top: 0;
    left: 0;
    animation: fadeIn 0.5s ease-in;
}

.screen.active {
    display: flex;
    justify-content: center;
    align-items: center;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Main Menu Styles */
.menu-container {
    text-align: center;
    z-index: 10;
    max-width: 600px;
    padding: 40px;
}

.game-title {
    position: relative;
    margin-bottom: 60px;
}

.game-title h1 {
    font-size: 4em;
    font-weight: 900;
    background: linear-gradient(45deg, #00ff88, #00ccff, #ff00ff, #ffaa00);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 4s ease infinite;
    text-shadow: 0 0 30px rgba(0, 255, 136, 0.5);
    letter-spacing: 3px;
}

.game-title h2 {
    font-size: 1.8em;
    color: #00ff88;
    margin-top: 10px;
    text-shadow: 0 0 20px rgba(0, 255, 136, 0.6);
    font-weight: 300;
    letter-spacing: 2px;
}

.title-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(0, 255, 136, 0.2) 0%, transparent 70%);
    animation: pulse 3s ease-in-out infinite;
    pointer-events: none;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes pulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.5; }
    50% { transform: translate(-50%, -50%) scale(1.2); opacity: 0.8; }
}

.menu-buttons {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.menu-btn {
    background: linear-gradient(135deg, rgba(0, 255, 136, 0.1) 0%, rgba(0, 204, 255, 0.1) 100%);
    border: 2px solid #00ff88;
    color: #ffffff;
    padding: 20px 40px;
    font-size: 1.3em;
    cursor: pointer;
    border-radius: 15px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.3);
}

.menu-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.menu-btn:hover::before {
    left: 100%;
}

.menu-btn:hover {
    background: linear-gradient(135deg, rgba(0, 255, 136, 0.3) 0%, rgba(0, 204, 255, 0.3) 100%);
    transform: translateY(-5px);
    box-shadow: 0 10px 40px rgba(0, 255, 136, 0.5);
    border-color: #00ccff;
}

.menu-btn:active {
    transform: translateY(-2px);
}

.btn-icon {
    font-size: 1.5em;
}

.exit-btn {
    border-color: #ff4444;
    box-shadow: 0 0 20px rgba(255, 68, 68, 0.3);
}

.exit-btn:hover {
    background: linear-gradient(135deg, rgba(255, 68, 68, 0.3) 0%, rgba(255, 0, 0, 0.3) 100%);
    border-color: #ff0000;
    box-shadow: 0 10px 40px rgba(255, 68, 68, 0.5);
}

/* Info Screens */
.info-container {
    max-width: 800px;
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid #00ff88;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 0 50px rgba(0, 255, 136, 0.4);
    max-height: 90vh;
    overflow-y: auto;
}

.info-container h2 {
    font-size: 2.5em;
    color: #00ff88;
    margin-bottom: 30px;
    text-align: center;
    text-shadow: 0 0 20px rgba(0, 255, 136, 0.6);
}

.info-content {
    color: #e0e0e0;
    line-height: 1.8;
    font-size: 1.1em;
}

.info-content p {
    margin-bottom: 15px;
}

.info-content ul {
    margin-left: 30px;
    margin-bottom: 15px;
}

.info-content li {
    margin-bottom: 10px;
}

.info-content strong {
    color: #00ff88;
}

.credits-content {
    text-align: center;
}

.credit-item {
    margin-bottom: 30px;
    padding: 20px;
    background: rgba(0, 255, 136, 0.05);
    border-radius: 10px;
    border: 1px solid rgba(0, 255, 136, 0.2);
}

.credit-item h3 {
    color: #00ccff;
    margin-bottom: 10px;
    font-size: 1.5em;
}

.special-thanks {
    background: rgba(255, 170, 0, 0.1);
    border-color: rgba(255, 170, 0, 0.3);
}

.special-thanks h3 {
    color: #ffaa00;
}

.back-btn {
    background: linear-gradient(135deg, #00ff88 0%, #00ccff 100%);
    border: none;
    color: #000;
    padding: 15px 40px;
    font-size: 1.2em;
    font-weight: bold;
    cursor: pointer;
    border-radius: 10px;
    margin-top: 30px;
    transition: all 0.3s ease;
    box-shadow: 0 5px 20px rgba(0, 255, 136, 0.4);
}

.back-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(0, 255, 136, 0.6);
}

/* Game Screen */
.game-container {
    width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column;
    background: linear-gradient(135deg, #0f0f1e 0%, #1a1a2e 100%);
}

.game-header {
    background: rgba(0, 0, 0, 0.6);
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #00ff88;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.5);
}

.header-left h3 {
    font-size: 1.5em;
    color: #00ff88;
    margin-bottom: 5px;
}

.status-indicators {
    display: flex;
    align-items: center;
    gap: 10px;
}

.status-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #666;
}

.status-dot.active {
    background: #00ff88;
    box-shadow: 0 0 10px #00ff88;
    animation: blink 2s ease-in-out infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.status-text {
    color: #00ff88;
    font-size: 0.9em;
}

.header-right {
    display: flex;
    gap: 15px;
}

.header-btn {
    background: rgba(0, 255, 136, 0.1);
    border: 2px solid #00ff88;
    color: #00ff88;
    padding: 10px 20px;
    cursor: pointer;
    border-radius: 8px;
    font-size: 1em;
    transition: all 0.3s ease;
}

.header-btn:hover {
    background: rgba(0, 255, 136, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 255, 136, 0.4);
}

/* NPC Display */
.npc-display {
    display: flex;
    justify-content: center;
    gap: 40px;
    padding: 30px;
    background: rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid rgba(0, 255, 136, 0.3);
}

.npc-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background: rgba(0, 0, 0, 0.5);
    border: 2px solid #00ff88;
    border-radius: 15px;
    box-shadow: 0 5px 25px rgba(0, 255, 136, 0.3);
    transition: all 0.3s ease;
    min-width: 250px;
}

.npc-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 35px rgba(0, 255, 136, 0.5);
}

.npc-image-container {
    position: relative;
    width: 150px;
    height: 150px;
}

.npc-image {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #00ff88;
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.5);
}

.npc-status {
    position: absolute;
    bottom: 5px;
    right: 5px;
}

.status-indicator {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #666;
    border: 2px solid #000;
    display: block;
}

.status-indicator.thinking {
    background: #ffaa00;
    box-shadow: 0 0 10px #ffaa00;
    animation: pulse 1.5s ease-in-out infinite;
}

.status-indicator.talking {
    background: #00ff88;
    box-shadow: 0 0 10px #00ff88;
    animation: pulse 0.8s ease-in-out infinite;
}

.npc-info {
    text-align: center;
}

.npc-info h4 {
    font-size: 1.3em;
    color: #00ff88;
    margin-bottom: 5px;
}

.npc-mood {
    color: #00ccff;
    font-style: italic;
    font-size: 0.9em;
}

/* Chat Area */
.chat-container {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: rgba(0, 0, 0, 0.2);
}

.chat-messages {
    max-width: 1200px;
    margin: 0 auto;
}

.system-message {
    text-align: center;
    padding: 15px;
    margin: 20px 0;
    background: rgba(0, 255, 136, 0.1);
    border-radius: 10px;
    border: 1px solid rgba(0, 255, 136, 0.3);
}

.system-message p {
    color: #00ff88;
    font-style: italic;
}

.message {
    margin: 20px 0;
    padding: 20px;
    border-radius: 15px;
    animation: slideIn 0.3s ease;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.3);
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 10px;
}

.message-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid;
}

.message-author {
    font-weight: bold;
    font-size: 1.1em;
}

.message-time {
    margin-left: auto;
    font-size: 0.85em;
    opacity: 0.7;
}

.message-content {
    padding-left: 55px;
    line-height: 1.6;
    font-size: 1.05em;
}

.message.player {
    background: linear-gradient(135deg, rgba(0, 204, 255, 0.2) 0%, rgba(0, 153, 255, 0.2) 100%);
    border: 2px solid #00ccff;
}

.message.player .message-avatar {
    border-color: #00ccff;
}

.message.player .message-author {
    color: #00ccff;
}

.message.happy-stoner {
    background: linear-gradient(135deg, rgba(0, 255, 136, 0.2) 0%, rgba(0, 200, 100, 0.2) 100%);
    border: 2px solid #00ff88;
}

.message.happy-stoner .message-avatar {
    border-color: #00ff88;
}

.message.happy-stoner .message-author {
    color: #00ff88;
}

.message.steven {
    background: linear-gradient(135deg, rgba(255, 170, 0, 0.2) 0%, rgba(255, 140, 0, 0.2) 100%);
    border: 2px solid #ffaa00;
}

.message.steven .message-avatar {
    border-color: #ffaa00;
}

.message.steven .message-author {
    color: #ffaa00;
}

.message.npc-chat {
    background: linear-gradient(135deg, rgba(255, 0, 255, 0.15) 0%, rgba(200, 0, 200, 0.15) 100%);
    border: 2px solid #ff00ff;
    font-style: italic;
}

.message.npc-chat .message-author {
    color: #ff00ff;
}

/* Input Area */
.input-container {
    padding: 20px 30px;
    background: rgba(0, 0, 0, 0.6);
    border-top: 2px solid #00ff88;
}

.input-wrapper {
    display: flex;
    gap: 15px;
    max-width: 1200px;
    margin: 0 auto;
}

#messageInput {
    flex: 1;
    padding: 15px 20px;
    background: rgba(0, 0, 0, 0.5);
    border: 2px solid #00ff88;
    border-radius: 10px;
    color: #ffffff;
    font-size: 1.1em;
    outline: none;
    transition: all 0.3s ease;
}

#messageInput:focus {
    border-color: #00ccff;
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.4);
}

.send-btn {
    background: linear-gradient(135deg, #00ff88 0%, #00ccff 100%);
    border: none;
    color: #000;
    padding: 15px 30px;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 5px 20px rgba(0, 255, 136, 0.4);
}

.send-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(0, 255, 136, 0.6);
}

.send-btn:active {
    transform: translateY(-1px);
}

.input-info {
    display: flex;
    justify-content: space-between;
    max-width: 1200px;
    margin: 10px auto 0;
    font-size: 0.9em;
    color: #888;
}

.tip {
    color: #00ff88;
}

/* Loading Overlay */
.loading-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.loading-overlay.active {
    display: flex;
}

.loading-content {
    text-align: center;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 5px solid rgba(0, 255, 136, 0.3);
    border-top-color: #00ff88;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-content p {
    color: #00ff88;
    font-size: 1.2em;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #00ff88 0%, #00ccff 100%);
    border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #00ccff 0%, #00ff88 100%);
}

/* Responsive Design */
@media (max-width: 768px) {
    .game-title h1 {
        font-size: 2.5em;
    }
    
    .game-title h2 {
        font-size: 1.2em;
    }
    
    .npc-display {
        flex-direction: column;
        gap: 20px;
    }
    
    .input-wrapper {
        flex-direction: column;
    }
    
    .send-btn {
        width: 100%;
        justify-content: center;
    }
}
