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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #1a1a2e;
    color: #e0e0e0;
    min-height: 100vh;
}

.panel {
    max-width: 420px;
    margin: 80px auto;
    padding: 32px;
    background: #16213e;
    border-radius: 12px;
    border: 1px solid #0f3460;
}

h1 {
    font-size: 1.5rem;
    margin-bottom: 4px;
    color: #e94560;
}

.subtitle {
    color: #888;
    margin-bottom: 24px;
    font-size: 0.9rem;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.85rem;
    color: #aaa;
}

.form-group input {
    width: 100%;
    padding: 10px 12px;
    background: #0f3460;
    border: 1px solid #1a1a4e;
    border-radius: 6px;
    color: #e0e0e0;
    font-size: 1rem;
    outline: none;
}

.form-group input:focus {
    border-color: #e94560;
}

button {
    padding: 10px 20px;
    background: #e94560;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.95rem;
    transition: background 0.2s;
}

button:hover { background: #c73650; }
button:disabled { background: #555; cursor: not-allowed; }

#connect-btn {
    width: 100%;
    margin-top: 8px;
}

.status {
    margin-top: 12px;
    font-size: 0.85rem;
    min-height: 20px;
}

.status.error { color: #ff6b6b; }
.status.info { color: #6bafff; }
.status.success { color: #6bff6b; }

/* Remote Desktop View */
#remote-panel {
    max-width: none;
    margin: 0;
    padding: 0;
    border-radius: 0;
    border: none;
    background: #111;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

#toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px 12px;
    background: #1a1a2e;
    border-bottom: 1px solid #333;
    font-size: 0.85rem;
    flex-shrink: 0;
}

#toolbar span { color: #aaa; }
#toolbar button {
    padding: 4px 12px;
    font-size: 0.8rem;
    background: #333;
}
#toolbar button:hover { background: #555; }

#canvas-container {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    position: relative;
}

#remote-canvas {
    max-width: 100%;
    max-height: 100%;
    cursor: none;
    outline: none;
}

/* Chat Panel */
#chat-panel {
    height: 150px;
    border-top: 1px solid #333;
    display: flex;
    flex-direction: column;
    background: #16213e;
    flex-shrink: 0;
}

#chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 8px 12px;
    font-size: 0.85rem;
}

#chat-messages .msg {
    margin-bottom: 4px;
}
#chat-messages .msg .sender {
    color: #e94560;
    font-weight: 600;
}
#chat-messages .msg .text {
    color: #ccc;
}

#chat-input-row {
    display: flex;
    padding: 6px;
    gap: 6px;
    border-top: 1px solid #0f3460;
}

#chat-input {
    flex: 1;
    padding: 6px 10px;
    background: #0f3460;
    border: 1px solid #1a1a4e;
    border-radius: 4px;
    color: #e0e0e0;
    font-size: 0.85rem;
    outline: none;
}

#chat-input-row button {
    padding: 6px 12px;
    font-size: 0.8rem;
}

/* Fullscreen */
body.fullscreen #toolbar { display: none; }
body.fullscreen #chat-panel { display: none; }
body.fullscreen #remote-panel { margin: 0; }
