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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

#app {
    min-height: 100vh;
}

.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.login-box {
    background: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 400px;
}

.login-box h1 {
    text-align: center;
    margin-bottom: 30px;
    color: #333;
}

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

.input {
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.input:focus {
    outline: none;
    border-color: #667eea;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 5px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-primary {
    background: #667eea;
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background: #5568d3;
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover:not(:disabled) {
    background: #5a6268;
}

.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-danger:hover:not(:disabled) {
    background: #c82333;
}

.link {
    text-align: center;
    color: #667eea;
    cursor: pointer;
    margin-top: 10px;
}

.link:hover {
    text-decoration: underline;
}

.error {
    color: #dc3545;
    text-align: center;
    margin-top: 10px;
}

.main-container {
    min-height: 100vh;
    background: #f5f5f5;
}

.header {
    background: white;
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.header h2 {
    color: #333;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.content {
    padding: 30px;
}

.devices-view {
    max-width: 1200px;
    margin: 0 auto;
}

.toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.toolbar h3 {
    color: #333;
}

.device-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.device-card {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.device-info h4 {
    margin-bottom: 10px;
    color: #333;
}

.device-info p {
    color: #666;
    font-size: 14px;
    margin-bottom: 10px;
}

.status {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.status.online {
    background: #d4edda;
    color: #155724;
}

.status.offline {
    background: #f8d7da;
    color: #721c24;
}

.device-actions {
    margin-top: 15px;
    display: flex;
    gap: 10px;
}

.remote-view {
    height: calc(100vh - 100px);
    display: flex;
    flex-direction: column;
}

.remote-toolbar {
    background: white;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    display: flex;
    gap: 10px;
}

.remote-container {
    flex: 1;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

#remoteCanvas {
    max-width: 100%;
    max-height: 100%;
    cursor: crosshair;
}

.dialog-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.dialog {
    background: white;
    padding: 30px;
    border-radius: 8px;
    width: 100%;
    max-width: 400px;
}

.dialog h3 {
    margin-bottom: 20px;
    color: #333;
}

.dialog .input {
    margin-bottom: 15px;
}

.dialog-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
}

@media (max-width: 768px) {
    .header {
        padding: 15px;
        flex-direction: column;
        gap: 10px;
    }
    
    .content {
        padding: 15px;
    }
    
    .device-list {
        grid-template-columns: 1fr;
    }
}
