/* PyRO MUD Web Client - Authentic Ragnarok Online Chat Box Style */

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

body {
    font-family: 'Tahoma', 'Arial', sans-serif;
    background: #f0f0f0;
    color: #000000;
    height: 100vh;
    overflow: hidden;
}

#app {
    height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.header {
    background: linear-gradient(to bottom, #4169e1 0%, #1e40af 100%);
    padding: 6px 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #000080;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
    height: 50px;
    flex-shrink: 0;
}

.logo h1 {
    color: #ffffff;
    font-size: 1.3rem;
    font-weight: bold;
    margin: 0;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

.tagline {
    color: #e6f2ff;
    font-size: 0.75rem;
}

.header-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Audio Controls */
.audio-controls {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 3px 8px;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 4px;
}

.audio-btn {
    background: none;
    border: none;
    color: #ffffff;
    font-size: 1rem;
    cursor: pointer;
    padding: 2px;
    border-radius: 3px;
    transition: all 0.2s;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.audio-btn:hover {
    background: rgba(255,255,255,0.2);
}

.audio-btn.muted {
    color: #ffcccc;
}

.volume-slider {
    width: 50px;
    height: 3px;
    background: rgba(255,255,255,0.3);
    border-radius: 2px;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 10px;
    height: 10px;
    background: #ffffff;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s;
}

.volume-slider::-webkit-slider-thumb:hover {
    background: #e6f2ff;
    transform: scale(1.1);
}

.connection-status {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.8rem;
    color: #ffffff;
}

.status-connected { color: #90ee90; }
.status-disconnected { color: #ffcccb; }
.status-connecting { 
    color: #ffeb3b; 
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* Main RO Game Container */
.ro-game-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: calc(100vh - 50px);
    background: #f0f0f0;
    padding: 6px;
}

/* RO Message Area - White background like RO chat */
.ro-message-area {
    flex: 1;
    background: #ffffff;
    border: 2px solid #4169e1;
    border-bottom: 1px solid #4169e1;
    border-radius: 4px 4px 0 0;
    overflow: hidden;
    box-shadow: inset 0 0 3px rgba(0,0,0,0.1);
}

/* RO Chat Title Bar */
.ro-message-area::before {
    content: "Game Messages";
    display: block;
    background: linear-gradient(to bottom, #4169e1 0%, #1e40af 100%);
    color: #ffffff;
    padding: 3px 8px;
    font-size: 11px;
    font-weight: bold;
    border-bottom: 1px solid #000080;
    text-shadow: 1px 1px 1px rgba(0,0,0,0.5);
}

.ro-chat-output {
    font-family: 'Tahoma', 'Arial', sans-serif;
    font-size: 12px;
    line-height: 1.3;
    white-space: pre-wrap;
    word-wrap: break-word;
    color: #000000;
    background: #ffffff;
    height: calc(100% - 20px);
    overflow-y: auto;
    padding: 4px 6px;
    scrollbar-width: thin;
    scrollbar-color: #4169e1 #f0f0f0;
}

/* RO Chat Panel - Sticky Bottom with blue styling */
.ro-chat-panel {
    flex-shrink: 0;
    background: linear-gradient(to bottom, #4169e1 0%, #1e40af 100%);
    border: 2px solid #4169e1;
    border-top: 1px solid #4169e1;
    border-radius: 0 0 4px 4px;
    padding: 6px;
    box-shadow: 0 -1px 3px rgba(0,0,0,0.2);
}

.ro-chat-input-row {
    display: flex;
    gap: 6px;
    margin-bottom: 4px;
}

.ro-input {
    flex: 1;
    padding: 4px 6px;
    background: #ffffff;
    border: 1px solid #cccccc;
    border-radius: 2px;
    color: #000000;
    font-family: 'Tahoma', 'Arial', sans-serif;
    font-size: 12px;
    outline: none;
}

.ro-input:focus {
    border-color: #4169e1;
    box-shadow: 0 0 0 1px rgba(65, 105, 225, 0.3);
}

.ro-send-btn {
    padding: 4px 12px;
    background: linear-gradient(to bottom, #6495ed 0%, #4169e1 100%);
    border: 1px solid #1e40af;
    border-radius: 2px;
    color: #ffffff;
    cursor: pointer;
    font-family: 'Tahoma', 'Arial', sans-serif;
    font-size: 11px;
    font-weight: bold;
    text-shadow: 1px 1px 1px rgba(0,0,0,0.3);
    transition: all 0.1s;
    min-width: 50px;
}

.ro-send-btn:hover {
    background: linear-gradient(to bottom, #87ceeb 0%, #6495ed 100%);
}

.ro-send-btn:active {
    background: linear-gradient(to bottom, #4169e1 0%, #1e40af 100%);
    transform: translateY(1px);
}

/* Quick Commands - Blue RO style buttons */
.ro-quick-commands {
    display: flex;
    gap: 3px;
    flex-wrap: wrap;
}

.ro-btn {
    padding: 2px 6px;
    background: linear-gradient(to bottom, #6495ed 0%, #4169e1 100%);
    border: 1px solid #1e40af;
    border-radius: 2px;
    color: #ffffff;
    cursor: pointer;
    font-family: 'Tahoma', 'Arial', sans-serif;
    font-size: 10px;
    font-weight: bold;
    text-shadow: 1px 1px 1px rgba(0,0,0,0.3);
    transition: all 0.1s;
    min-width: 28px;
    text-align: center;
}

.ro-btn:hover {
    background: linear-gradient(to bottom, #87ceeb 0%, #6495ed 100%);
}

.ro-btn:active {
    background: linear-gradient(to bottom, #4169e1 0%, #1e40af 100%);
    transform: translateY(1px);
}

/* Scrollbar Styling for RO Chat - Blue theme */
.ro-chat-output::-webkit-scrollbar {
    width: 10px;
}

.ro-chat-output::-webkit-scrollbar-track {
    background: #f0f0f0;
    border: 1px solid #cccccc;
}

.ro-chat-output::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, #6495ed 0%, #4169e1 100%);
    border-radius: 3px;
    border: 1px solid #1e40af;
}

.ro-chat-output::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(to bottom, #87ceeb 0%, #6495ed 100%);
}

/* Message Types */
.message-system {
    color: #0066cc !important;
    font-weight: bold;
}

.message-error {
    color: #cc0000 !important;
    font-weight: bold;
}

.message-command {
    color: #006600 !important;
    font-style: italic;
}

.message-game {
    color: #000000 !important;
}

/* Animation for new messages */
@keyframes fadeIn {
    from { 
        opacity: 0; 
        transform: translateY(5px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

.new-message {
    animation: fadeIn 0.2s ease-out;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .header {
        padding: 4px 8px;
        height: 45px;
    }
    
    .logo h1 {
        font-size: 1.1rem;
    }
    
    .tagline {
        font-size: 0.7rem;
    }
    
    .ro-game-container {
        height: calc(100vh - 45px);
        padding: 4px;
    }
    
    .ro-input {
        font-size: 11px;
        padding: 3px 5px;
    }
    
    .ro-send-btn {
        padding: 3px 8px;
        font-size: 10px;
    }
    
    .ro-btn {
        padding: 2px 4px;
        font-size: 9px;
        min-width: 24px;
    }
    
    .audio-controls {
        padding: 2px 6px;
    }
    
    .volume-slider {
        width: 40px;
    }
}

@media (max-width: 480px) {
    .header {
        flex-direction: column;
        gap: 3px;
        height: auto;
        padding: 6px;
    }
    
    .ro-game-container {
        height: calc(100vh - 70px);
    }
    
    .ro-quick-commands {
        justify-content: center;
    }
    
    .ro-btn {
        flex: 1;
        max-width: 50px;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .ro-chat-output {
        background: #ffffff;
        color: #000000;
    }
    
    .ro-input {
        background: #ffffff;
        color: #000000;
        border-color: #000000;
    }
}

.monster-link {
    color: #8cf;
    text-decoration: underline;
    cursor: pointer;
    font-weight: bold;
}
.monster-link:hover {
    color: #fff;
    background: #246;
    border-radius: 3px;
    padding: 1px 2px;
}

.exit-link {
    color: #285;
    text-decoration: underline;
    cursor: pointer;
    font-weight: bold;
    margin-right: 4px;
}
.exit-link:hover {
    color: #fff;
    background: #285;
    border-radius: 3px;
    padding: 1px 2px;
}